Loading

Assign a null value to a lookup field in Process Builder

게시 일자: Oct 13, 2022
상세 설명
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.'
솔루션


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

Knowledge 기사 번호

000387749

 
로드 중
Salesforce Help | Article