I'm trying to develop a process under Process Builder, but I'm running into a different issue than my previous post.
The Use Case
There is currently a custom Object called Grants that has 2 relevant custom fields: Expected Amount (Currency field) and Grant Contract Received (Checkbox). I am looking to develop a process via the Process Builder where if the Expected Amount field is between specific ranges AND the Grant Contract Received box is checked, then a list of Tasks are generated via the process (dependent on the $ amount in the Expected Amount field); the list of Tasks generated is essentially our Stewardship protocol for our Development Team to follow up with our individual donors.
So far, I've constructed this in Process Builder (samples of some of the Action Groups):
Object and Specify When to Start the Process
Object: Grant
Start the process: when a record is created or edited
Allow process to evaluate a record multiple times in a single transaction?: No
Criteria for Action Groups
Criteria Name: 250-499
Criteria for Executing Actions: Filter conditions are met
Set Filter Conditions: Grant Contract Received EQUALS True; Expected Amount GREATER THAN OR EQUAL $250.00; Expected Amount LESS THAN $500.00
Filter Conditions: All of the conditions are met (AND)
Execute actions when specified changes made to record: Yes
Immediate Actions
Action: Create a Record
Object: Task
Assigned To ID: Grant__c.LastModifiedByID
Priority: Normal
Task Record Type ID: [Task record type]
Subject: Phone Call from Development Lead
Due Date Now: [custom formula field to take Today() + n]
Name ID: Grant__c.Foundation__c (lookup to m-d between Grants and Accounts)
I ran a debug log to see what exactly was happening, and I'm pretty sure I've found the error (underlined above and in the debug log):
33.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
17:53:24.088 (88740590)|EXECUTION_STARTED 17:53:24.088 (88770897)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:01IE0000000DzvX
17:53:24.106 (106240821)|WF_RULE_EVAL_BEGIN|Workflow
17:53:24.106 (106264413)|WF_CRITERIA_BEGIN|[Grant: MSDF Grant a10E00000009HMA]|Stewardship_Protocol_Development_Team301E00000004GCp|01QE00000008mNr|ON_ALL_CHANGES|0
17:53:24.106 (106348717)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]true|Values:
17:53:24.106 (106355274)|WF_CRITERIA_END|true
17:53:24.106 (106963758)|WF_SPOOL_ACTION_BEGIN|Workflow
17:53:24.106 (106995266)|WF_ACTION| Flow Trigger: 1;
17:53:24.106 (106998694)|WF_RULE_EVAL_END
17:53:24.107 (107714585)|WF_FLOW_ACTION_BEGIN|09LE0000000TNJT
17:53:24.109 (109261612)|FLOW_CREATE_INTERVIEW_BEGIN|00DE0000000bzSS|300E00000004Lf1|301E00000004GCp
17:53:24.112 (112135733)|FLOW_CREATE_INTERVIEW_END|56834698d8bd114f534f1cc9abbb14d3081350-6f47|Grant Development Team v1.1
17:53:24.113 (113558997)|FLOW_START_INTERVIEWS_BEGIN|1
17:53:24.115 (115950171)|FLOW_START_INTERVIEW_BEGIN|56834698d8bd114f534f1cc9abbb14d3081350-6f47|Grant Development Team v1.1 17:53:24.116 (116790893)|FLOW_START_INTERVIEW_END|56834698d8bd114f534f1cc9abbb14d3081350-6f47|Grant Development Team v1.1
17:53:24.138 (138348024)|FLOW_ELEMENT_ERROR|UPSERT --- UPSERT FAILED --- ERRORS : (FIELD_INTEGRITY_EXCEPTION) Name ID: id value of incorrect type: 001E000001Ahl7KIAR --- for SFDC record with ID : null, |FlowRecordCreate|myRule_6_A1
17:53:24.144 (144096778)|FLOW_START_INTERVIEWS_END|1
17:53:24.144 (144167510)|WF_FLOW_ACTION_ERROR|09LE0000000TNJT|300E00000004Lf1|Error executing flow: Stewardship_Protocol_Development_Team, FlowDefId: 300E00000004Lf1, FlowVersionId: 301E00000004GCp
17:53:24.144 (144190523)|WF_FLOW_ACTION_ERROR_DETAIL|An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.
17:53:24.144 (144275973)|WF_FLOW_ACTION_END|09LE0000000TNJT
17:53:24.144 (144291963)|CODE_UNIT_FINISHED|Workflow:01IE0000000DzvX
17:53:24.146 (146235412)|EXECUTION_FINISHED
How can I make the Task record that is being created via the Process Builder automatically "be related to" the Account that my custom Object is master-detail to? And am I missing anything else in my Process / are there any other errors?
I would be so grateful for any help here, or at least direction to the right place!
4 risposte
Hi Mark,
Name ID is the person, you need it going to the Account which means using Related To ID instead
If you look at a new Task using the regular UI
You'll see that the Name field can only be a Contact or a Lead
The Related To field can be anything else (basically not a person)