1

In salesforce security review am getting a error FLS create which is for ID field. so when a FLS create error occurred, validated the isCreateable or isUpdatebale for update condtion.enter image description here

Here how to validate the error, When validated isCreatable for ID field error didn't occur but the record is not inserting. (cant check isCreatable for ID field right?) How to manage both the FLS create issue and ID field issue.

And can please tell me should I validate both isCreatable and isUpdateable for upsert operation ?

1

The Security Scanner tool is not as great when it comes to Apex.

  1. I would ignore the reported error and implement the right way logically which is - Don't check Id isCreateable().

  2. Yes, you should validate both isCreatable and isUpdateable for Upsert operation.

| improve this answer | |
  • The Id field will always have isUpdateable as false. – Adrian Larson Apr 11 '18 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.