Describe the problem/error/question
Using the Salesforce node to create a new Case. But it has a mandatory “Type Name” field. My organisation does not use this field and not showing anywhere, and we can create new Case without a value for this.
What is the error message (if any)?
I tried saving the node without a value, but got this error and can’t proceed.
I even tried selecting an option and executing it, but for error from Salesforce
Error code
400
Full message
400 - [{"message":"Unable to create/update fields: Type. Please check the security settings of this field and verify that it is read/write for your profile or permission set.","errorCode":"INVALID_FIELD_FOR_INSERT_UPDATE","fields":["Type"]}]
the salesforce node has ‘type’ hardcoded as a required field based on the default salesforce schema. since your org’s field-level security blocks access to this field, the standard node operation will always fail because it forces you to send a value, which salesforce then rejects.
to bypass this, use the http request node to create the case directly via the salesforce rest api. you don’t need to set up new credentials for this.
-
add an http request node
-
set authentication to ‘predefined credential type’ and select your existing salesforce credentials
-
set method to POST
-
set url to https://[your-instance].my.salesforce.com/services/data/v58.0/sobjects/Case
-
turn on ‘send body’ and pass your case data as json (excluding the type field)
this gives you full control over the payload and skips the ui validation of the standard salesforce node.
@ericccl — dima’s HTTP route works, but before going that path
i’d check one thing first since it’s usually the actual cause:
your error INVALID_FIELD_FOR_INSERT_UPDATE on the Type field
means salesforce is rejecting the value because of field-level
security, not because the field is missing. someone with admin
access in your org can fix this in 2 minutes:
setup → object manager → case → fields & relationships → type →
set field-level security → check “visible” and “edit” for your
profile or the integration user’s profile.
if your org genuinely doesn’t use the Type field at all, ask the
admin to either:
- remove “Type” from required on the page layout, or
- mark all picklist values inactive — then n8n won’t force a value
if you can’t get admin access and have to go the HTTP route,
dima’s approach is correct but a couple of things to add:
-
find your instance url from your salesforce login — it’s in
the browser address bar, something like https://yourcompany.my.salesforce.com
or https://yourcompany.lightning.force.com. use the .my.salesforce.com
one for the api.
-
bump the api version — v58.0 is from late 2023, current is
v62.0. just swap it in the url:
/services/data/v62.0/sobjects/Case
-
body example for clarity:
{
"Subject": "Customer issue",
"Description": "Details here",
"Status": "New",
"Origin": "Web",
"AccountId": "0011x00000XXXXX"
}
no Type field at all — salesforce will use the org default or
leave it null if the field truly isn’t used.
- if you get a 401 on first run, your salesforce oauth credential
is fine but the token might need refreshing — open the credential,
hit reconnect, then re-run.
which path are you leaning toward — admin fix or http workaround?