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
kamal_Raokamal_Rao 

how to edit standard fields in salesforce using apex.............

hi,

i am traying to editing standard fieldscreateedby how can... it is plausible in apex ....why becous in custam  object having one farmula field that is "createedby.email" my sorce data is coming out of the box using rest that user details can be insert in custam object createedby field how it can......do
Boris BachovskiBoris Bachovski
There are some standard SYSTEM fields that you can't change (even thorugh the API). These fields are read-only for everyone. What you can do is hide those standard Salesforce system fields and create your own custom ones that you can populate in a trigger. And finally create formula fields that will show either the custom system field value (if populated) or alternatively the standard system field value.
Deepak Kumar ShyoranDeepak Kumar Shyoran
You can't modify system generated field Created By as it's automatically populated with the currently logged in User and these field are not Editable.

Please mark this post a best solution for your Question if it’s solve your problem.
Boris BachovskiBoris Bachovski
@Deepak how is that different/better from the answer tha I've provided?
kamal_Raokamal_Rao
Hi Boris Bachovski ,
how to hide standard field...
Boris BachovskiBoris Bachovski
Login as system admin, go on the record view page and click Edit Layout (top-right corner). Find the field that you want to hide, drag & drop it into the top section.
kamal_Raokamal_Rao
ohhh..... not like this man but not change my formula field right that is given same email id ...