1

How manage FLS Create issues in Checkmarx for upsert statements ?

I use isCreateable() for insert and isUpdateable() for update.

But for upsert, I don't know what function I have to use (one or both).

  • I have used below solution but its still giving me the same issue. Any idea how I should make it work? – snehakem Aug 24 '17 at 13:43
2

You need to check both isCreateable() and isUpdateable() for upsert.

  • If I have only one of both permissions (create or update), the AND will returns FALSE and I won't do the upsert statement ! – SF_user Oct 7 '16 at 9:29
  • Yes. Upsert means Update or Insert. If you want to perform an Upsert you should have create and update permission on that object. So it should be checked. – Reshma Oct 7 '16 at 9:34
  • How can we check for Id field. I already check for isAccesible but still its showing the same error. – Monish Mar 17 '17 at 9:02
  • @Reshma I have used this solution but its still giving me the same issue. Any idea how I should make it work? – snehakem Aug 24 '17 at 13:43

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.