I have created a lightning component that accepts input from user and saves the data to the custom object. Now i want to check duplication of the record based on two fields. Let suppose Name and Date, i.e if name and date together of the current record is same as any other existing record then it should not be saved.

How do i handle that in apex?

  • 1
    What have you tried so far? Can you please share your lightning component you have mentioned? – Mahmood Apr 9 '19 at 11:05

Use the platform's configurable built-in duplicate rules mechanism and report any errors this generates back to the user in your component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.