cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to make Template field is mandatory for create Change Notice

BA_10670508
5-Regular Member

How to make Template field is mandatory for create Change Notice

Hi All,

I need to make Template attribute mandatory which is present on Create Change notice Wizard ? How I can do that.

PFA.

BA_10670508_0-1688034148919.png

 

4 REPLIES 4
avillanueva
22-Sapphire II
(To:BA_10670508)

A Data Utility would be my guess. You would have to find the details on that UI element (jcaDebug) and they find the Data Utility it uses. You can either superclass it and tick off required to write your own. I do not think this is as easy as the Type Manager attribute definition.

Hi @BA_10670508 @avillanueva 

 

The template definition is more hardcoded. 

And yes DataUtility can help in this issue. 

 

I think more simple way is just set a default preselected template. 

HelesicPetr_0-1688039332087.png

 

 

PetrH

BA_10670508
5-Regular Member
(To:HelesicPetr)

Hi @HelesicPetr @avillanueva ,

What can be the selector for this template attribute(for data utility). Because it is not IBA attribute.

Thanks

HI @BA_10670508 

 

The selector is changeObjectTemplatePicker

 

definition in ...Windchill\codebase\com\ptc\core\components\components.dataUtilities.properties

 

wt.services/svc/default/com.ptc.core.components.descriptor.DataUtility/changeObjectTemplatePicker/java.lang.Object/0=com.ptc.windchill.enterprise.change2.dataUtilities.ChangeTemplatePickerDataUtility/duplicate

 

class to extend is com.ptc.windchill.enterprise.change2.dataUtilities.ChangeTemplatePickerDataUtility

 

I tried it this way but I haven't written a setRequired yet.

 

 

package cz.aveng.Test;

import com.ptc.core.components.descriptor.ModelContext;
import com.ptc.windchill.enterprise.change2.dataUtilities.ChangeTemplatePickerDataUtility;
import wt.util.WTException;

public class ECNTemplateRequired extends ChangeTemplatePickerDataUtility
{
	@Override
	public Object getDataValue(String var1, Object var2, ModelContext var3) throws WTException
	{
		Object component = super.getDataValue(var1, var2, var3);
		
		return component;
	}
}

 

 

 

PetrH. 

 

 

Top Tags