You need to sign in to do that
Don't have an account?

Status scenario Trigger
Hi All,
I am new to SFDC. I want a trigger on an object. The developing scenario is given below.
The object is contains a custom pick list field called Status__c which contains pending, processing and Approved as a values. After creating a record, if we want to change the status field value from approved to processing and pending, we need to get an error, as well as we need to get one more error while changing the status field value from processing to pending. But no error has to come, while value changing from pending to processing and approved, and processing to Approved.
Please can anyone provide the trigger with above scenario.
Thanks in advance
KS Kumaar
I am new to SFDC. I want a trigger on an object. The developing scenario is given below.
The object is contains a custom pick list field called Status__c which contains pending, processing and Approved as a values. After creating a record, if we want to change the status field value from approved to processing and pending, we need to get an error, as well as we need to get one more error while changing the status field value from processing to pending. But no error has to come, while value changing from pending to processing and approved, and processing to Approved.
Please can anyone provide the trigger with above scenario.
Thanks in advance
KS Kumaar
You can add more condition checks for other status values by putting || (OR)
All Answers
You'd like something like this.
You put condition and message error that you want.
Marcilio
You can add more condition checks for other status values by putting || (OR)
Thank you for your help. Both trigger are working good.