How to solve the insufficient access rights on cross reference Id?
The error message is being displayed. While inserting the Opportunity followed by Opportunity Line item from the VisualForce page through the controller, I am logged in as a user whose profile license is “authenticated website”. However, while logged in as another user whose license is “customer portal manager” the code works well. Both orgs possess Opportunity OWD “read only” and opportunity line item “controlled by parent” To fix the issue I used “without sharing” on a class that runs the insertion code, and it works well from “authenticated website” user. Can you fix the error?
The object access can be verified for the profile. Teh error is seen while trying to insert a thing which cannot be inserted logically. You wish to update a record that is absent. You attempt to update the object field that can’t be created explicitly. The fields can be updated implicitly. You are aiming to provide authority but you don’t possess the permission. While trying to share record X with user Y and you don’t have access to record X the error is seen.
Also if you possess record types on the Opportunity or Line items, verify that user’s profile has access. This will be provided for SysAdmins, in “without sharing’ as well. Ensure that you do not upgrade a record that is absent or build-in, and you do the action through the user who has not the correct access to alter the object.
The Salesforce Certification Training offered at JanBask Training provides experience like offline classes to help candidates master the Salesforce Development and Administration in a better way to face the tough job market scenario. The course guarantees job success and lets you qualify the certification exam through intensive, and expert-led virtual sessions and hands-on practical assignments. The course will teach you to create and configure the salesforce account to help you gather, extract, and examine the data relevant to the customer base. You can also avail the Force.com platform to create and use the advanced cloud apps with utmost confidence.