+ Start a Discussion
AntonyWarcAntonyWarc 

Lead assignment Apex trigger help needed!

Hi,

 

We have a 3rd party webserivce that send leads from our site to SF with Lead Owner already assigned based on some coded rules. We now want to add a level of lead assignment above what this can handle, so I wrote a lead assignment rule and have activated it.

 

The rules seem to be completley ignored as leads are coming in, but work if a lead is edited and saved ticking the "use active assignmnet rules" checkbox. (i.e the lead assignment crieria works, but its not being triggered)

 

So I thought a trigger to re-run lead assignment directly after a lead has been created would be the only solution, issue is I have no coding experience (aside from one easy update trigger some guys on here helped with!)

 

Can anyone help? Or if another solution exists that woudl be great too!

 

Antony

Best Answer chosen by Admin (Salesforce Developers) 
Sonam_SFDCSonam_SFDC

Hi Antony,

 

Did you test the lead assignment rule by manually creating a lead and saving it?

Lead assignment rule should ideally trigger when a lead is created irrespective frrom the origin it has come in to salesforce..

 

Please check and let me know..

All Answers

Sonam_SFDCSonam_SFDC

Hi Antony,

 

Did you test the lead assignment rule by manually creating a lead and saving it?

Lead assignment rule should ideally trigger when a lead is created irrespective frrom the origin it has come in to salesforce..

 

Please check and let me know..

Sonam_SFDCSonam_SFDC

Hi Antony,

 

Did you test the lead assignment rule by manually creating a lead and saving it?

Lead assignment rule should ideally trigger when a lead is created irrespective frrom the origin it has come in to salesforce..

 

Please check and let me know..

This was selected as the best answer
AntonyWarcAntonyWarc
Hi Sonam,

The rules work, I have tested them when creating and also editing leads. The issue was lead assignment not being triggered when a lead comes from the web. Another user on a different board has helped with an Apex trigger to help with this.

Thanks for your time though.