function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc@isha.ax1814sfdc@isha.ax1814 

process builder formula help- Urgent

Hi Team,

I ahve a below process builder. When ever iam trying to fire process builder iam geeting below error . Please help me how to fix this issue.


AND(
ISPICKVAL([Case].Status , "Closed"),
NOT(ISPICKVAL([Case].Origin , "Satmetrix")),
ISCHANGED([Case].Status) , 
NOT(ISBLANK([Case].ContactID)),
[Case].RecordType.Name =  'Intel Request',
OR(
ISPICKVAL([Case].GiCa_Intel_Request_Subtype__c, "Threat"),
ISPICKVAL([Case].GiCa_Intel_Request_Subtype__c, "Technical")
),
AND(
NOT(ISBLANK([Case].Contact.Account.Name )),
NOT(ISNULL([Case].Contact.AccountId ))
),
NOT(BEGINS([Case].Account.Name, "FireEye")),
NOT(CONTAINS([Case].Contact.Email, '@mandiant.com')),
NOT(CONTAINS([Case].Contact.Email, 'FireEye')),
NOT(CONTAINS(TEXT([Case].Gica_OutCome__c) , 'Unable to Support') )
)


flow error:

Error element myDecision4 (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Id because it hasn't been set or assigned.

Flow Details
Flow API Name: NPX_Case_Closure_Nomination
Type: Record Change Process
Version: 22
Status: Active
Org: FireEye Inc. (00D22000000DBIr)

Flow Interview Details
Interview Label: NPX_Case_Closure_Nomination-22_InterviewLabel
Current User: Nice User (00522000001NTRM)
Start time: 8/27/2019 1:03 AM
Duration: 0 seconds

How the Interview Started
Nice User (00522000001NTRM) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = Case (500220000035BNpAAM)
myVariable_current = Case (500220000035BNpAAM)

DECISION: myDecision
Skipped this outcome because its conditions weren't met: myRule_1
Outcome conditions:
{!formula_myRule_1} (false) Equals true

Default outcome executed.

Salesforce Error ID: 1861759023-21181 (-1729454283)
Error element myDecision4 (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Id because it hasn't been set or assigned.

Flow Details
Flow API Name: NPX_Case_Closure_Nomination
Type: Record Change Process
Version: 22
Status: Active
Org: FireEye Inc. (00D22000000DBIr)

Flow Interview Details
Interview Label: NPX_Case_Closure_Nomination-22_InterviewLabel
Current User: Nice User (00522000001NTRM)
Start time: 8/27/2019 1:03 AM
Duration: 0 seconds

How the Interview Started
Nice User (00522000001NTRM) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = Case (500220000035BNpAAM)
myVariable_current = Case (500220000035BNpAAM)

DECISION: myDecision
Skipped this outcome because its conditions weren't met: myRule_1
Outcome conditions:
{!formula_myRule_1} (false) Equals true

Default outcome executed.

Salesforce Error ID: 1861759023-21181 (-1729454283)



Regards,
Isha
Khan AnasKhan Anas (Salesforce Developers) 
Hi Isha,

Greetings to you!

According to Knowledge Article: https://help.salesforce.com/articleView?id=000315965&language=en_US&type=1&mode=1 (https://help.salesforce.com/articleView?id=000315965&language=en_US&type=1&mode=1)

To avoid "The flow failed to access the value because it hasn't been set or assigned" error, use criteria to check if the foreign key (aka relationship) field is null before making cross-object references based on that field.

Note: The order of the criteria matters. The check to verify that a lookup is not null should be made before evaluating any conditions which make a cross-object reference across that lookup.

Continuing the example given above, the process criteria should be "'Contact].AccountId Is Null False' AND '[Contact].Account.Name equals Acme' in that order. The check for AccountId being null has to be before the cross-object reference which relies on the Account field being populated.


When using "Formula evaluates to true" in the Criteria for Executing Actions, the formula below can be used in this example:

AND (NOT(ISBLANK( [Contact].AccountId )), [Contact].Account.Name = "Acme")

Note: Many standard relationships include "Id" in the field name, which sometimes causes confusion with regard to the field(s) which need to be checked for null values. Continuing the example above, a common mistake would be trying to check for null in "[Contact].Account.Id", which is a cross-object reference to the Id field on the Account and will fail when the Account lookup is blank. The correct criteria would check "[Contact].AccountId" (which is the Account lookup on the Contact). It is important to ensure the criteria checks the lookup field itself, rather than making a cross-object reference to the "Id" field on another object.


Note:: As mentioned in Known Issue W-2763830, this formula syntax does not work when using Formula-Based Criteria and making a cross-object reference to a Picklist field (specifically when using the TEXT or ISPICKVAL functions with the spanning reference to that picklist). If you need to make cross-object reference to a picklist field in Process Builder Criteria, use Condition-Based criteria. If you must use formula-based criteria, use the CASE function when making cross-object references to picklists.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
sfdc@isha.ax1814sfdc@isha.ax1814
Hi Khan,

Thanks for the reply.

I have used the same like above .But still getting the same error.

AND(
ISPICKVAL([Case].Status , "Closed"),
NOT(ISPICKVAL([Case].Origin , "Satmetrix")),
ISCHANGED([Case].Status) , 
NOT(ISBLANK([Case].ContactID)),
[Case].RecordType.Name =  'Intel Request',
OR(
ISPICKVAL([Case].GiCa_Intel_Request_Subtype__c, "Threat"),
ISPICKVAL([Case].GiCa_Intel_Request_Subtype__c, "Technical")
),
AND(
NOT(ISBLANK([Case].AccountId )),
NOT(BEGINS([Case].Account.Name, "FireEye"))
),

NOT(CONTAINS([Case].Contact.Email, '@mandiant.com')),
NOT(CONTAINS([Case].Contact.Email, 'FireEye')),
NOT(CONTAINS(TEXT([Case].Gica_OutCome__c) , 'Unable to Support') )
)



Error element myDecision4 (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Id because it hasn't been set or assigned.

Flow Details
Flow API Name: NPX_Case_Closure_Nomination
Type: Record Change Process
Version: 23
Status: Active
Org: FireEye Inc. (00D22000000DBIr)

Flow Interview Details
Interview Label: NPX_Case_Closure_Nomination-23_InterviewLabel
Current User: Nice User (00522000001NTRM)
Start time: 8/27/2019 1:29 AM
Duration: 0 seconds

How the Interview Started
Nice User (00522000001NTRM) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = Case (500220000035BNpAAM)
myVariable_current = Case (500220000035BNpAAM)

DECISION: myDecision
Skipped this outcome because its conditions weren't met: myRule_1
Outcome conditions:
{!formula_myRule_1} (false) Equals true

Default outcome executed.

 
Maharajan CMaharajan C
Please try the below formula:

AND(
ISPICKVAL([Case].Status , "Closed"),
NOT(ISPICKVAL([Case].Origin , "Satmetrix")),
ISCHANGED([Case].Status) , 
AND(
NOT(ISBLANK([Case].ContactID)),
NOT(CONTAINS([Case].Contact.Email, '@mandiant.com')),
NOT(CONTAINS([Case].Contact.Email, 'FireEye'))),
AND(NOT(ISBLANK([Case].RecordTypeId)),
[Case].RecordType.Name =  'Intel Request'),
OR(
ISPICKVAL([Case].GiCa_Intel_Request_Subtype__c, "Threat"),
ISPICKVAL([Case].GiCa_Intel_Request_Subtype__c, "Technical")
),
AND(
NOT(ISBLANK([Case].AccountId )),
NOT(BEGINS([Case].Account.Name, "FireEye"))
),
NOT(CONTAINS(TEXT([Case].Gica_OutCome__c) , 'Unable to Support'))
)

Thanks,
Maharajan.C
sfdc@isha.ax1814sfdc@isha.ax1814
Hi Maharajan,

Thank you for your reply. Getting same error still.

If iam not going to provide Account value is blankon case. Iam gettig the sameerror 

Error element myDecision4 (FlowDecision).
The flow failed to access the value for myVariable_current.Account.Id because it hasn't been set or assigned.

Flow Details
Flow API Name: NPX_Case_Closure_Nomination
Type: Record Change Process
Version: 26
Status: Active
Org: FireEye Inc. (00D22000000DBIr)

Flow Interview Details
Interview Label: NPX_Case_Closure_Nomination-26_InterviewLabel
Current User: Nice User (00522000001NTRM)
Start time: 8/27/2019 7:59 AM
Duration: 0 seconds

How the Interview Started
Nice User (00522000001NTRM) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = Case (500220000035D1EAAU)
myVariable_current = Case (500220000035D1EAAU)

DECISION: myDecision
Skipped this outcome because its conditions weren't met: myRule_1
Outcome conditions:
{!formula_myRule_1} (false) Equals true

Default outcome executed.

Salesforce Error ID: 1158160614-49466 (-1729454283)


Regards,
Isha