How to make "template" field as required in New Change Notice Window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to make "template" field as required in New Change Notice Window.
How to make "Template" field as required in New Change Notice Window.
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This action is available only to Administrators. You start in the Templates for a Product/Library/Org/Site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Bhushan,
Thanks much for your help.
Thanks and Regards,
Bhagirath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
sorry for my simplistic answer - I misread the question