Reputation: 221
We're implementing a coupon program. The coupons are unique codes and are related to an existing customer and stored in a custom field on the Account.
When a Lead is created due to being referred using one of the unique coupons, the unique coupon is saved in a custom field on the Lead. I need to access the associated Account Id of the unique coupon.
I could do this by creating a trigger on lead insert and then query accounts looking for unique coupon. My concern with this approach is having a trigger and query on every lead created; seems this would not be good pratice - using so much resources for a rare situation
Is there another (better) approach; lookup?
Thanks
Upvotes: 0
Views: 238
Reputation: 447
If you build the trigger correctly there should be no concern about resources. But it really depends on what you're trying to do with the Account data, I don't know the architecture though so you will need to give more details
Upvotes: 0