You need to sign in to do that
Don't have an account?
Tejashwini S 1
update the Contact owner and Account owner with the user who created the Case, How to do this
update the Contact owner and Account owner with the user who created the Case, How to do this
The trigger should be modified slightly as below.
This will work for update scenerio also.
Please mark it as best answer, If this solution helps,
Thanks,
All Answers
please try using the below code.
If this solution helps, Please mark it as best answer.
Thanks,
Try below trigger. I believe it will help you.
don't forget to mark it as best answer.
Thank you
This trigger is not fulfilling the conditions.
Once I change the owner the account and contact the owner remains the same.
Could you plz help me to resolve this?
You need to write before update trigger on Account and Contact object. and check with Account Owner and Contact Owner with Case Owner.
if Owner is same then user can't change new owner.
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
As per the question you mentioned the owner should be changed only while creation. So written the code for insert scenerio. I will update the code for update scenerio also and will share here.
Thanks,
The trigger should be modified slightly as below.
This will work for update scenerio also.
Please mark it as best answer, If this solution helps,
Thanks,
Thank you so muchhh...
If the solution helped you , Please mark it as best answer.
Thanks,