Procedure
1. Create a new delegate, such as CustomObjectReferenceAttributeSaveDelegate.
2. Add an entry about the delegate in the BaseClient.service.properties.xconf file located at WT_HOME/codebase/com/ptc/windchill/baseclient/xconf.
<Service context="default" name="com.ptc.windchill.baseclient.server.delegate.ObjectReferenceAttributeSaveDelegate">
<Option cardinality="duplicate" requestor="null" serviceClass="com.ptc.windchill.baseclient.server.delegate.CustomObjectReferenceAttributeSaveDelegate" selector="com.ptc.windchill.enterprise.data.EnterpriseData|com.ptc.windchill.enterprise.data.enterpriseData.PlantSpecificEnterpriseData|org.rnd.Pune~alternateobjref" />
</Service>
The selector is the object name and attribute id.
3. Override the following methods in CustomObjectReferenceAttributeSaveDelegate:
void postProcess(Persistable source, Persistable objectRefence, AttributeConfig attributeConfig, String ncid);selectedObject, String ncid);
Provides logic to execute custom actions after saving the object reference attribute.
void Boolean refreshAllAttribute();
Determines whether all the attributes should get refreshed after executing the save action.
After performing the above steps, the CustomObjectReferenceAttributeSaveDelegate class appears as shown:
Was this helpful?