You need to sign in to do that
Don't have an account?
Aliaksei Razumau
How to relate contact / lead objects to a custom object.
I want to use access codes for specific events. I have a custom object called "Event Codes" with only one primary field which represents access code itself (text symbols only with length < 16, each code is unique). I manually add up new codes to an object. Some contacts and leads have text field with access code and it's one of the values of a custom object mentioned above. I use an integration with 3rd party, so that some contacts and leads have this field populated automatically with access code (text representation).
How can I relate contact / lead with my custom object based on access code? How can I relate already existing records?
I believe "Event codes" object should be a master while lead / contact are children. But I can't create master detail relationship at contact / lead object (have no such option).
How can I relate contact / lead with my custom object based on access code? How can I relate already existing records?
I believe "Event codes" object should be a master while lead / contact are children. But I can't create master detail relationship at contact / lead object (have no such option).
In order to relate the existing records you'll need to write some Apex code that finds the Event Code record matching the text field on the Lead/Contact record and populate the lookup with the record id.
You can then use this code from a trigger to populate the lookup when a new Contact/Lead is inserted with the text field populated.
This does pre-suppose that the event record exists though - you may need to create these as part of the apex code too.
I created lookup on my custom object with target object as lead(parent) , my coj now appears on lead parent obj