• Michael Robert 19
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Lightning recordEditForm will not render anything if the logged in user has only read permission based on data-level security.

I have a custom object that is a child of Opportunity so its data-level security is controlled by its parent (Opportunity) sharing settings.

All of my user Profiles have Object-level permissions set to Read/Write on the child object and I rely on data-level security (sharing settings) to determine which users can read and which can write the child object.
I created a custom Aura component for this object with a lightning:recordEditForm component and a lightning:inputField.

I would expect the recordEditForm to render for all users but only allow the users with read/write permssion to save changes. In fact, the inputField will not render at all for the read-only user. The Save button will render but not the input field.

The recordEditForm form works fine for the read/write user.
If I replace the entire lightning:recordEditForm with a lightning:recordViewForm the read-only user can see the data but now the read/write users cannot edit it.
I was expecting that I could use the same recordEditForm for all users and allow data-level security settings to control who can make changes.

The standard record detail page works correctly: all of the fields are visible to both users but only the users with read/write permission can save changes. So I know that the sharing settings are working as expected. I would like the lightning:recordEditForm to behave the same as the record detail page.

Has anybody encountered this problem before? Your help is much appreciated.

Hi

 

I am trying to create formula to calculate discount  ((ListPrice - UnitPrice ) / ListPrice) * 100 on quote line item.

I can see ListPrice read only field is there on quote line item still I am getting error ListPrice field does not exist.

 

Or

Is there any waty I can bring discount amount from opportunity line item.

 

Thanks,