1

Use case is:

Integration user does REST API call to insert an Account without a RecordTypeId:

POST /services/data/v54.0/sobjects/Account 
{"Name" : "smoke-test"}

Integration User has ...

  • Profile = Minimum Access - Salesforce

  • Permission Set MyIntegration

    • Grants create/edit/view on Account
    • Assigns recordtype B2B
    • Run Flows enabled
  • Before save flow coerces any Account record without RecordTypeId to the B2B recordtypeId


RESULT when API runs:

Record type missing for : Account; CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

Debug log has no entries for traced integration user - not even the before save flow.

Why is this happening?

1 Answer 1

3

The obvious things were checked

  • Flow is active
  • Permission set assigned
  • CRUD access verified

The answer has to do with Profile Minimum Access - Salesforce

In the target org, the configuration for that profile for Account looked like this:

enter image description here


Note that there isn't even a default recordtype of --Master--

So, when the DML insert is done, SFDC checks to see if the running user has defined a default recordtype when none presented in the payload. Since you can't define default recordtypes in Permission Sets and there's no default for the Profile Minimum Access - Salesforce, the insert fails almost immediately at the beginning (probably step 2) of the Save process

By changing the profile Minimum Access - Salesforce to at least have a default record type of --Master--, the record will save successfully


enter image description here

You must log in to answer this question.

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