How to get the attribute value of first save, second save, etc??
Hi,
Can you please anyone help on this below need?
I require to disable one attribute[not editable] once after the first save with referring to its one of the value.
Example:
I have a field called "Flag" ==> True or False values
On its "False" value , it is saved first time, When user try to change its value after the first save, the field should be disabled and should not allow user to change its value.
Looking for the favor from anyone.
Thanks
Sudar
Accepted answer
Comments
Thanks Eric !
But,
I require, the attribute to be "Read only" if its value was "FALSE" before its first save.
If the attribute value is "TRUE" on its first save, it should be enabled definitely subsequently.
Hope it is clear.
you can differentiate between the value BEFORE the save, and the proposed value AFTER the save. you cannot see the state 10 saves ago. (or even 2)
if the prior state was null, and this state is not, then this is the save on create.(first save)
if the prior state is New and this state is New, then it is a subsequent save. (one of potentially many)
you would have to have another attribute to save the initial value in.
1 vote
Comments
Sudaraazhi Arivalagan
Nov 04 '14, 5:44 a.m.Note: This is a server-side code, should be implemented by Advisors.