You need to sign in to do that
Don't have an account?
vivek raj 47
How to avoid duplicate record created by Apex batch job that runs from different user account at the same time
Hi Everyone,
I am facing duplicate record issues that is created by APEX batch job. When this batch has been invoked by salesforce button (Javascript) at the same time by different user account.
Thanks,
Vivek
I am facing duplicate record issues that is created by APEX batch job. When this batch has been invoked by salesforce button (Javascript) at the same time by different user account.
- Both user account (A1 and A2) have duplicate record created A1R1, A1R2 by A1 & A2R1, A2R2 by A2.
- This scenario only occured if the button pressed at the same by by both the user account.
- If the button is not clicked at the same time , it works perfectly fine.
Thanks,
Vivek
Greetings!
Have you tried by creating the duplicate rule on the Object based on the field.So,whenever the user tries to click on the button then it will check for the duplicate records if it exists then it will throw the error.
Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.
Warm Regards,
Shirisha Pathuri