This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Required Fields Change with State

jsnosal - Wednesday, November 21, 2012 11:28 AM:

Is there a way to change required fields by the state of the ECO? An example would be when the state is New I want to make sure that the change control board is filled in. Another example would be when the ECO is In Work that the change reason has been filled in. Thank you for your help. 

 

Josh



Dave_Rollinson - Wednesday, November 21, 2012 12:21 PM:

You can either use a Method on the "onBeforeUpdate" Server Event to test for values based on the value of the "state" property or you can use the "Pre" Method on the Lifecycle transition to check the required values.

Using the Lifecycle transition may work better as it only prevents the promotion to the next state, rather than preventing the user from saving the Item (e.g. if he doesn't have the relevant information).



jsnosal - Wednesday, November 21, 2012 1:27 PM:

Thank you for your quick response. Is there a way to have multiple methods per transition in the Life Cycle Map or will I have to add to the current methods being used? Thanks for your help.

 

Josh



Dave_Rollinson - Monday, November 26, 2012 7:33 AM:

Josh

You can only call one Method on the L/C transition, but you can construct a custom Method to call several Methods on this e.g.:

 

// Custom Method

this = this.apply("My_Method01");

if (this.isError) {return this;}

this = this.apply("My_Method02");

if (this.isError) {return this;}

.....etc.