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
ivetkinivetkin 

sObject is not updated

Hi All,

I  have the next issue: I perform some Apex custom logic on sObject:

For example  CustomObject__c   myObj before processing has empty fields "field1" and  "field2"

Then, After processing I see in Debug logs that this object is populated with appropriate field values

myObj.field1 = '11111'

myObj.field2 = '2222'    (there no  error validation rules or so)

 

But when I see this object in UI  It is still epty

Does anyone know what is the issue?

 

Thanks in Advance

Best Answer chosen by Admin (Salesforce Developers) 
ivetkinivetkin

The issue was in security settings forparticular records.

All Answers

Andrew WilkinsonAndrew Wilkinson

Did you perform an update on the objects?

ivetkinivetkin

Yes, I have updated this object.

A see in Debug log that DML operation was performed.

APathakAPathak

Is there any exception in the debug log? Can you post the code.

ivetkinivetkin

The issue was in security settings forparticular records.

This was selected as the best answer
sieb4mesieb4me
hi, i have same issue, can you please let me know what the issue was in security? thanks.
ivetkinivetkin

Hi, check your sharing settins in Apex class (without sharing declaration)