Grayed out OOTB actions when WTPart type object NOT having "Resulting Change Exists" indicator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Grayed out OOTB actions when WTPart type object NOT having "Resulting Change Exists" indicator
Grayed out below OOTB four action buttons when WTPart type object NOT having "Resulting Change Exists" indicator.
OOTB Action buttons to be grayed out :
1)Check Out
2)Check Out and Edit
3)Edit
4)Edit Common Attributes.
Which is best way to Grayed out OOTB action buttons:
1)Filters
2)Validators
Solved! Go to Solution.
- Labels:
-
General Customization
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @V_THAKARE
You asked for a custom function that disables the actions from menu if the object is not part of a change result table.
Understand.
So you ask for Filter or Validator, It is a same thing
Validator is a class where code is written and filter is a xml parameter in the customAction.xml file that points to the validator class
ps the com.ptc.core.ui.validation.DefaultSimpleValidationFilter is extendable class that can be used.
so your requirement is doable with validator/filter.
PetrH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The actions available on an object should be based on ACL's and a user's role in a team and the lifecycle state of the objects
If the object is not resulting from a change, and is in a final state (ex released)... then only Change Admin II or an org/site admin would see those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
But I want to add some other users/groups apart from Change Admin II or an org/site admin.
What is your opinion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @V_THAKARE
You asked for a custom function that disables the actions from menu if the object is not part of a change result table.
Understand.
So you ask for Filter or Validator, It is a same thing
Validator is a class where code is written and filter is a xml parameter in the customAction.xml file that points to the validator class
ps the com.ptc.core.ui.validation.DefaultSimpleValidationFilter is extendable class that can be used.
so your requirement is doable with validator/filter.
PetrH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
PetrH,
Let me try extendable class (DefaultSimpleValidationFilter).
Thank you for your support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi PetrH,
Can I use API isHasResultingChange(): boolean for WTPart to check state of object?
Do you have any sample code for this, so that I can get some idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @V_THAKARE
Here is a helper with an example input to get what you need.
if you use true, the Activity is return if you use false, the link Record is returned.
QueryResult var7 = ChangeHelper2.service.getLatestChangeItem(wtpx, "theChangeActivity2", wt.change2.ChangeActivity2.class, wt.change2.ChangeRecord2.class, true);
PetrH
