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

only ONE salesperson per lead
I have created a form ( Leads) where the data gets inserted .
Every Lead will have a Unique Lead ID.
I have another form where i add salesperson under that Lead, so in the drop down first lead is selected then the data of salesperon is added.
My question is i want to Add only ONE salesperson per lead.
So how do i manage this what is the best approach ? To show validation error that you have already added a salesperson... under LEADID.
Any code?
Every Lead will have a Unique Lead ID.
I have another form where i add salesperson under that Lead, so in the drop down first lead is selected then the data of salesperon is added.
My question is i want to Add only ONE salesperson per lead.
So how do i manage this what is the best approach ? To show validation error that you have already added a salesperson... under LEADID.
Any code?
If I under stood your question correctly,
use one query in save method or trigger. which extract salesperson's record which having selected lead id.
If that query is not null then add a message in page.
Mark this as best answer if its helps.
Thanks
Praveen Murugesan
All Answers
You can write a triigger by which you can get the information of lead and associated salesforce person. if that lead have alredy assign to any sales percon than it throw an error msg.
If I under stood your question correctly,
use one query in save method or trigger. which extract salesperson's record which having selected lead id.
If that query is not null then add a message in page.
Mark this as best answer if its helps.
Thanks
Praveen Murugesan