Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7193387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:09:37+00:00 2026-05-28T20:09:37+00:00

After reading this tidbit , it would seem that the current user’s permission would

  • 0

After reading this tidbit, it would seem that the current user’s permission would be irrelevant. However when calling this method as anyone but a user with the Administrator profile, it throws an INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY exception:

global without sharing class OpportunityTeamSales {
    WebService static void AssignToSalesTeam(string userId, string opportunityId)
    {
        OpportunityTeamMember tm = new OpportunityTeamMember();
        tm.OpportunityId = opportunityId;
        tm.UserId = userId;
        tm.TeamMemberRole = 'Sales Engineer';

        insert tm;
    }
}

Event with the explicit without sharing keywords, it appears to be enforcing field-level security/permissions to the object/child object. Opportunity and OpportunityTeamMember being system objects, we can’t edit the relationship.

UPDATE:

The user profile that is encountering the error has read/write/modify permissions on the Opportunity object and the OpportunityTeamMember object does not appear to have a specific permission set. We’re simply trying to create an OpportunityTeamMember, the lookup target of which the user has full permissions to with the exception of “delete.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:09:38+00:00Added an answer on May 28, 2026 at 8:09 pm

    without sharing means that the class doesn’t respect sharing rules, the rules which govern visibility of records within the system when the privacy setting for an object is set to private. As far as I’m aware it does not mean that object-level permissions are overridden, and so you can still not access a lookup field which joins to an object the user does not have access to, hence the error you’re seeing here. You’ll need to assign the user to a different user profile which does have access to these objects.

    EDIT

    Assuming your users do have the required access to the objects, I believe you also need the “Customize Application” permission checked on the user’s profile for them to be able to modify sales teams.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading this , it is my understanding that declaring a method as const
After reading this article on thedailywtf.com, I'm not sure that I really got the
After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid
After reading this question I attempted to clean out my workspace and found that
After reading this question , I've learned that denormalization is not a solution for
After reading this article , I'm thinking it's not possible. However, I have an
After reading this forum I am not sure which method is best to extract
After reading this article I made a point that int () yields 0 because
After reading this blog entry : http://wekeroad.com/post/4069048840/when-should-a-method-be-a-property , I'm wondering why Microsoft choose in
After reading this I would like to know what is the problem with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.