Skip to main content
12-Amethyst
September 9, 2015
Solved

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

  • September 9, 2015
  • 6 replies
  • 2419 views

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

Change Notice.png

Best answer by BhushanNehe

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

6 replies

1-Visitor
September 9, 2015

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

ChangeTemplate.jpg

16-Pearl
September 9, 2015

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

bkontham12-AmethystAuthor
12-Amethyst
September 18, 2015

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

16-Pearl
September 18, 2015

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

1-Visitor
September 9, 2015

sorry for my simplistic answer - I misread the question