There are some approval activities in opportunity as Gate 0 Approval, Gate 1 Approval, Gate 2 Approval, Gate 3 Approval, Users will be allowed to create each approval only after the previous approval activity status is “Approved” except Gate 0 Approval.
This I have achieved basically through scripting. First we have to create four different activity types for the above requirement. I have created below four activity types under Administration- Data — List of Values (Lov Type – TODO_TYPE)
ESGB Gate 0
ESGB Gate 1
ESGB Gate 2
ESGB Gate 3
Then we can write validation under BusComp_PreSetFieldValue of ‘Action’ BC to validate the previous activity status, when the user select the activity type.
Here as we have to validate three activities, I have written a general function and then associated the function at BusComp_PreSetFieldValue .
Please be reminded that, the Action BC should be a child of Opportunity BC while we do this validation.