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).

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

1 Answer 1

2

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

4
  • 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, 2016 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, 2016 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, 2017 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, 2017 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .