Skip to main content
5-Regular Member
August 8, 2023
Question

Revise Validator in Folder Browser

  • August 8, 2023
  • 1 reply
  • 4067 views

We would like to disable Revise action from Folder Browser's action if certain condition doesn't matches our expectations. It can be achieved through Object's Details page, But couldn't perform the same in Folder Action. 

 

Or else, Throwing explicit exception while revising the object from Folder Browser would also be fine. Please suggest your opinion dear friends!!

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
August 8, 2023

Hi @MN_10518175 

You can write own validator and add the validator to the function in customAction.xml

There can be many validators for the function. 

 

PetrH

5-Regular Member
August 8, 2023

Hello @HelesicPetr 

 

Thanks for your suggestion. The concern here is We had extended the ReviseValidator OOTB class for our custom class and chosen the selector of that specific Folder revise action, still it only calls performFullPreValidation method. 

 

On Run-time, so far, it's not possible for us to hide/block the action while revising from Folder browser.

HelesicPetr
22-Sapphire II
22-Sapphire II
August 8, 2023

Hi @MN_10518175 

I would suggest to create own validator not extended and configure your validator in customaction.xml

 

HelesicPetr_0-1691490798901.png

 

add your validator to the filter element

<action name="MULTIREVISEITEMS_FROMFOLDERS" checkaccess="true" enabledwhensuspended="true" renderType="PDM" selectRequired="true" uicomponent="REVISE_OUTSIDE_CHANGE">
 <command windowType="popup" class="java.lang.Object" method="MULTIREVISEITEMS_FROMFOLDERS" onClick="validateSomethingSelected(event)"/>
 <includeFilter name="disableForAdminLocked"/>
 <includeFilter name="disableForPartToCadBuildAdminLocked"/>
 <includeFilter name="myOwnValidatorRegistredInserviceproperties"/>
</action>

 

PetrH