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

Limit Promotion Request Select Participants to Only One User???

Emerald I

Limit Promotion Request Select Participants to Only One User???

When creating a new promotion request, is there any way to limit the select participants step so it only allows one user to be selected per role?

1 REPLY 1
Highlighted

Re: Limit Promotion Request Select Participants to Only One User???

Hello TomU,
Currently PDMLink doesn't provide any validations for selection of participants in promotion process except some site level preferences included in OOTB implementation.
You can find those under site->utilities->preference management.
In order to restrict promotion request creator to select only one user, you will have to validate the submitted form result. You can extend the validator from CreatePromotionRequestValidator and override the method public UIValidationResult validateFormSubmission(
UIValidationKey validationKey, UIValidationCriteria criteria,
Locale locale). Using criteria.getChecked you will get a map for users selected.
Deploy the validator by overriding action entry for workflowParticipantsStep in promotion requests action and putting afterVK entry for the same. Register the validator in site.xconf with the same selector you used in afterVK.
But the above approach is not reliable and may give unwanted results in some releases.
Another approach is you can override the FormDelegate used for this step. You can find this FormDelegate in same entry i mentioned above for workflowParticipantsStep in promotion requests action. You can call super.getParticipantsToProcess to get map of participants selected.
Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group