function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael WebbMichael Webb 

Help with a trigger for creating a new custom object.

We have a field on the Contact form called One Property Owned. This field will be updated in a list view so that one person can go through all of them in a fell swoop. There are two other custom objects one named Property, this is the lookup on the contact. They lookup the property name and it associates. In order to have a one to many association we have another object called Ownership, very simple it has the contact as a lookup and the Property as a lookup then puts them in a related list. So I need to create a trigger when the property lookup field One Property Owned, that will create an ownership object with the property in the looking and the contact associated. I have written quick ones to create cases, off an account but that is about it. If someone could get me on the right path I could probably figure it out. Thanks in advance for any direction. Any help is greatly appreciated.
BHinnersBHinners
Hi Michael, I know you are looking to do this with a Trigger, but I wanted to suggest that you consider using Flow instead.  Flow is a great tool for providing users with a single form for inputing data for multiple objects and then saving that data and creating the appropriate relationships in the data.  Here's the video from a Dreamforce session that explains how: http://t.co/XfIBaqf1Iv
Michael WebbMichael Webb
Thanks! I thought about flow I will continue to think about it since I haven't used flow. But I need a user to go through a bunch of records and edit the specific records then create an object. So I can see how the 2nd part would work, just not sure how the first portion will work.