0

I created a custom Partner Related list component in lightning since it is not supported yet. However, when I log in as one of the other users which is not admin, they cannot see the records nor are they allowed to add/delete.

The component is blank and when they click new, then choose account and role, they cannot save it. The error I am generating shows : Unable to read SObject.

Please help. Thanks![enter image description here]1

0

This sounds like an access permission problem for the fields, and then you will have to grant create and delete permissions for the object.

Go to Setup, User, Profiles and select the profile you want to grant access.

Find Field Level Security enter image description here

Edit the field level security to reveal the fields you need.

Then, scroll down further to the Object Permissions.enter image description here

Changing these should make things visible and usable..

  • Hi, Thank you for this! I already checked their visibility and for Partners, we just have to allow read, edit on Opportunities and Account. However, there is no Partner object here. Also, i used "without sharing" for my Class and it displays the data now. The problem now is that the user cannot insert new record. Same error message, Unable to Read SObject. – krisstannum Jun 27 '17 at 4:06
  • Could you check to see what Roles you are using? And can you elaborate on the "Partners" object? is it a custom object? if so, it should appear on this page, but it would be further down on the page. – Logan Jun 27 '17 at 11:55
  • Partners is the standard Partner object in salesforce. I checked all the roles that I have and it has read create edit permission for the Account and Opportunity object. What i'm trying to do is to insert a record through APEX since I created a custom component. The user can do it in the normal way through classic, in the related list section where the partner is located. But using the component I created, the user cannot. Which would mean there is something else that needs to be done to insert the record through APEX. – krisstannum Jun 29 '17 at 7:50
  • Then I would need to see the code to be able to help... – Logan Jun 30 '17 at 11:54
0
@AuraEnabled
public static void savePartner(Partner records){

     insert p;
}

That's what I have in APEX and it works fine if I am logged in as System Admin. However, if I log in as one of the users that has read and write permission to Account and Opportunity object, I can no longer add a record. I am getting Unable to read SObject error.

The Apex class is already without sharing so the users can actually view the record and even delete. It's just the adding that I am having troubles with. I am not sure if there's anything special that I need to do in order to add the records.

@logan

0

For those stumbling on this question, the best way to handle this scenario is through the AppExchange Partners Related List for Lightning Experience

  • Could you please take a moment to edit your post, clearly indicated if you are or are not affiliated with this product? – Adrian Larson Jan 18 '19 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.