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
Som_11Som_11 

For custom sales profile user When we add products for Order its not showing up, For admin user it working fine

Hi All,
For custom sales profile user When I add products for Order it's not getting added but for System Admin profile its working fine.

Can anyone help with this Please.
Best Answer chosen by Som_11
Som_11Som_11
Thanks Abhishek, I sorted out. Actually, the issue is not related to Cart object permission or any Profile related permission. Actually, we have an Account sharing model to private. In cart object, we have a lookup to account and in the above scenario, it was inserting Cart object and account lookup field but the user doesn't have access to the account. When Changed owner to the particular user it worked. I belive as we have Master-detail relationship for account field on Cart it was trying to add chile record at Account when the cart is getting created.

All Answers

AbhishekAbhishek (Salesforce Developers) 
Somesh,

Check the Profile permissions for the sales profile user and if you still didn't order then set debug logs and check it.


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
Som_11Som_11
Hi Abhishek, I checked Log for inserting Cart error is coming, I checked permission for that user profile for Cart object permission is there. Can u help with this.User-added image

User-added imageCart object permssion is also there for the respective User Profile.
AbhishekAbhishek (Salesforce Developers) 
Somesh,

There are multiple errors in the logs.

I have suggested you compare the sales and admin profile.

If still need help I would suggest you reach salesforce support.

Thanks.
Som_11Som_11
Thanks Abhishek, I sorted out. Actually, the issue is not related to Cart object permission or any Profile related permission. Actually, we have an Account sharing model to private. In cart object, we have a lookup to account and in the above scenario, it was inserting Cart object and account lookup field but the user doesn't have access to the account. When Changed owner to the particular user it worked. I belive as we have Master-detail relationship for account field on Cart it was trying to add chile record at Account when the cart is getting created.
This was selected as the best answer