Is it possible to Automatically lock all the attributes on a Subobject if the Master object attributes are locked?

Document ID : KB000055218
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:
Is it possible to Automatically lock all the attributes on a Subobject if the Master object attributes are locked?

Answer: 
Yes it is possible to do this with the use of a Virtual attribute. Here are the steps to do this.

On the Master Object:
-Create a boolean attribute named Locked
-Create a process that sets the Locked attribute to true and locks all attributes

On the Subobject:
-Create a new Virtual attribute based on the Locked attribute of the Master object
-Create a process that uses a Pre-condition on a step to check if that attribute is set to true and if true proceeds to lock all the attributes
-Set the process to automatically run on create.

This will start the subobject process when you create a new instance of the subobject. This process will wait until it sees the attribute set to true and then lock all the attributes on the subobject.