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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Grayed out OOTB actions when WTPart type object NOT having "Resulting Change Exists" indicator

V_THAKARE
5-Regular Member

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

1 ACCEPTED SOLUTION

Accepted Solutions

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. 

View solution in original post

6 REPLIES 6
jbailey
17-Peridot
(To:V_THAKARE)

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.

V_THAKARE
5-Regular Member
(To:jbailey)

But I want to add some other users/groups apart from Change Admin II or an org/site admin.

What is your opinion.

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. 

V_THAKARE
5-Regular Member
(To:HelesicPetr)

PetrH,

Let me try extendable class (DefaultSimpleValidationFilter).

 

Thank you for your support.

V_THAKARE
5-Regular Member
(To:V_THAKARE)

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.

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

Top Tags