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

Cross Object Formula Field
Hi All - thanks in advance for the help.
I have a set of custom fields on a custom object - called "Benefits" - to track codes which people use to register for a conference. "Benefits" custom object lives on the campaign.
I want to create a formula field on the "Benefits" object called "Codes Used" which counts the number of campaign members who have the <<Member Status>> = "Registered" and <<Discount Code>> = <<code on the benefit object>>.
Possible? Easy to set-up? What kind of code would be required?
Thanks so much!
I have a set of custom fields on a custom object - called "Benefits" - to track codes which people use to register for a conference. "Benefits" custom object lives on the campaign.
I want to create a formula field on the "Benefits" object called "Codes Used" which counts the number of campaign members who have the <<Member Status>> = "Registered" and <<Discount Code>> = <<code on the benefit object>>.
Possible? Easy to set-up? What kind of code would be required?
Thanks so much!
I think you can write a trigger to get the count, but before that I have few questions here:
- Is Discount Code a pick list field and present on either object, or it is fixed for the campaign record and a user select this Code on Benefit object only?
- How these two objects are related? Is it MD or Lookup? Which object is child and which is parent in this relationship?
Thanks,Rajneesh
Does Benefits object have a Lookup onto Campaign? If so, you cannot do this. You could create a number field adn then wirte a trigger on Benefit obejct to query the related Campaigns and update the field. You would also need ot write a trigger on campaign object in case "Discount Code" gets updated or Memebr status field.