You need to sign in to do that
Don't have an account?
rotfil
Validate on the presence of a note on the Lead object for a stage
I have a stage that I need to validate against a note on the Lead object.
So what needs to happen:
- A user adds a note (anything!)
- Then I can make the first stage as complete otherwise
Is this a validation rule or a trigger - and how would I go about either?
Thanks,
James
So what needs to happen:
- A user adds a note (anything!)
- Then I can make the first stage as complete otherwise
Is this a validation rule or a trigger - and how would I go about either?
Thanks,
James
A before update trigger on Lead object. Query for all Note (select id, parentid from note where ParentId IN LeadID) and store it in a list.
Now if the List is empty and if the user is trying to change the first stage, then .addError(You cannot change this as there are no notes).
Hope this is clear.
Thanks