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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to make "template" field as required in New Change Notice Window.

bkontham
12-Amethyst

How to make "template" field as required in New Change Notice Window.

How to make "Template" field as required  in New Change Notice Window.

Change Notice.png

ACCEPTED SOLUTION

Accepted Solutions

Hi Bhagirath,

You can extend com/ptc/windchill/enterprise/change2/dataUtilities/ChangeNoticeTypePickerDataUtility.java and override the getDataValue method. Just check if the object returned is of type com.ptc.core.components.rendering.guicomponents.ComboBox and if so set it as required using setRequired method.

Out of the box, this class is registered in  codebase/com/ptc/windchill/enterprise/change2/ChangeManagement-components.dataUtilities.properties.xconf

Let me know if this helps.

Regards,

Bhushan

View solution in original post

6 REPLIES 6

This action is available only to Administrators.  You start in the Templates for a Product/Library/Org/Site.

ChangeTemplate.jpg

Hi Bhagirath,

You can extend com/ptc/windchill/enterprise/change2/dataUtilities/ChangeNoticeTypePickerDataUtility.java and override the getDataValue method. Just check if the object returned is of type com.ptc.core.components.rendering.guicomponents.ComboBox and if so set it as required using setRequired method.

Out of the box, this class is registered in  codebase/com/ptc/windchill/enterprise/change2/ChangeManagement-components.dataUtilities.properties.xconf

Let me know if this helps.

Regards,

Bhushan

Hi Bhushan,

Thanks much for your info. Following the above instructions I made the template field as required field.

We have two organizations in the system, is there way two implement this change for only one organization?

Thanks,

Bhagirath

Hi Bhagirath,

Using the third parameter modelContext in the getDataValue method you can get the commandbean and using the CreateAndEditWizBean you should be able to get the organization name. Refer below example.

com.ptc.netmarkets.util.beans.NmCommandBean commandBean = mc.getNmCommandBean();

com.ptc.core.components.beans.CreateAndEditWizBean.getContainerRef(commandBean).getContainer().getOrganizationName()

Regards,

Bhushan

Hi Bhushan,

Thanks much for your help.

Thanks and Regards,

Bhagirath

sorry for my simplistic answer - I misread the question

Announcements


Top Tags