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 called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

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

bkontham
11-Garnet

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

1 ACCEPTED SOLUTION

Accepted Solutions
BhushanNehe
14-Alexandrite
(To:bkontham)

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
kpritchard
4-Participant
(To:bkontham)

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

ChangeTemplate.jpg

BhushanNehe
14-Alexandrite
(To:bkontham)

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

BhushanNehe
14-Alexandrite
(To:bkontham)

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

kpritchard
4-Participant
(To:bkontham)

sorry for my simplistic answer - I misread the question

Top Tags