Loading

Assign a null value to a lookup field in Process Builder

Data pubblicazione: Oct 13, 2022
Descrizione
Process Builder throws an error when you assign a null value on a lookup field while using it in field update or record create action.
 
Steps to reproduce:
  1. Navigate to Process Builder from Setup.
In Salesforce Classic: Setup | Create | Workflows & Approvals | Process Builder
In Lightning Experience: Setup | Process Automation | Process Builder
  1. Click on your process name.
  2. Click on Add Action.
  • Update Records
  • Object = [your object]
  • Field: [your lookup Field] = Use {!$GlobalConstant.EmptyString} or leave this blank.
  1. Click Save.
     
When you try the above mentioned steps, you will get an error message:
 
Error 1: If the field is left blank 
'This field is required.'

Error 2: If using {!$GlobalConstant.EmptyString} 
'The value for this field type must be a 15- or 18-character Salesforce ID. For example, 5003000000D8cuI.'
Risoluzione


To set the lookup field to null or an empty value set the following in the action (Step 3 above):

  • Object = [your object]
  • Field = [your lookup field]
  • Type = Global Constant
  • Value = $GlobalConstant.Null

This will allow the null setting of the Lookup field.

Note that any field requirements may still throw errors such as validation rules.


See also
Lightning Process Builder
Locate the Unique ID of a Record in Salesforce
Validation Rules

Numero articolo Knowledge

000387749

 
Caricamento
Salesforce Help | Article