+ Start a Discussion

update a custom field that calculates the number of leads

Hello everyone 
I have a custom field named "number of leads" associate to a campaign object and I want to calculate a number of leads associate to this company 
when a lead was registred , the value of  "number of leads " became number of leads +1
what can I do ?? 
thank you for your time
Hi Imma,

As there is no master detail relationship so Roll up summary field can not be used.

It can be achieved through a small triger code on Campaign Member object.

Let us know if it helps you.
Thank you Ashish but i don't have any experience with code !! could you help me more please ??
Campaign has already got the Total Leads and Total Contacts fields, you just need to appear them on the page layout.

What I understand you need +1 for that create a custom formula field and add 1 to the total leads field.
 I want a field like that but with an other personnel object , so how they do this field : " total leads " ?? with workflow or a trigger ?? 
Create a master detail relationship and use rollup summary field.
Domnic JohnsonDomnic Johnson
If you have individual campaigns for each company, then you could create a formula field on the personel object and mirror the number of leads from campaign object itself