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
karenkkarenk 

Why setFieldsToNull not work on Contact fields

I am working on an API that updates the Contact table.   I use the setFieldsToNull(nullFields[]) for fields that need to set to null  but got the nullPointerException.  I coded the same way in my another API that updates the Account table fields, it worked fine. 

Can anyone tell me why the setFieldsToNull do not work on Contact fields?

Thanks

KarenK

EnderEnder
It works for me, where are you getting your Null Pointer Exception? Can you post your code. Seems like it may just be a coding issue.
karenkkarenk
Thank you, Ender, you bright my eyes.  It was syntax error.