0
votes

I am going to create several contact records by providing values only to the following fields.

 Contact newCont = new Contact (FirstName = 'John',
                                LastName = 'Smith',
                                Email = '[email protected]');

The following should be unique. Email + FirstName + LastName so, I created a formula text field for this.

I am thinking of executing an upsert so that I do not have to do several condition checks. How should I implement this ? what field should this upsert based on ?

Regards

1

1 Answers

0
votes

If I understand, you created a formula field that concatenates the Email + FirstName + LastName fields.

If yes, then I would say you have nothing to do because formula fields gets automatically updated, regardless on when the record was created/updated.
If you created a workflow rule or a process builder, then you have to say this rule triggers when the record is updated. Then, you can simply make a "false" update with Data Loader by sending only the Id of the records.