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
Aman nemaAman nema 

Read only Lookup field on clone

Hi All,

I have a read only lookup field on Opportunity Page layout.
I am cloning the record so loosing the data of this field that is expected behavior of alesforce but on production it is copying the read only field value on cloning the record.
I compared profile on QA and Prod. It has same access on both environment.
Can any one help me to find out the reason that why it is working on Prod?
Is there any workflow or trigger populates this field from background while cloning the record. Because those background running processes runs in system mode and field level security dont comes in picture on those.
Aman nemaAman nema
We override the New button. We are getting the value in read only lookup field throgh lightning component.
We did not override clone button and it is working in standard way.
Please a have a look at this articles if this is useful:

The production for which u are facing problems, are the user profile having 'Edit Read-Only fields' access.
Aman nemaAman nema
"Edit Read-Only fields" is unchecked for the user profile still read only field getting update on clone.
ok. as per existing articles, it shouldn't copy into new record. I will take some time to research on this..
Aman nemaAman nema

I read that post but not get the exact reason.