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
Renee JRenee J 

Please help! Process Builder Flow Code Error

Hello! 

Thank you to anyone in advance for helping with my question! 

I am receiving the following error in the SFDC Flow Process Builder when running a process flow to automatically populate one SFDC Account Executive based on the other Account Executive's information: 


CREATE RECORDS: Create_ATM
Create one AccountTeamMember record where:
AccountAccessLevel = Edit
AccountId = {!var_AccID} (null)
CaseAccessLevel = Edit
OpportunityAccessLevel = Edit
TeamMemberRole = POC Rep
UserId = {!var_POCRepOnAccID} (null)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [AccountId, UserId]. You can look up ExceptionCode values in the SOAP API Developer Guide.

May you please help me with my code? How may I fix this?

Thank you so very much for the consideration! :) 
 
ShirishaShirisha (Salesforce Developers) 
Hi Renee,

Greetings!

As per the error message,I can see that the AccountId and UserId are required fields.However,when you are trying to work on one record these values are passing as Null.

So,can you please check the record has AccountId and UserId values.If not,please update them so that it will have some value so that it will be able to create the records successfully.

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.

Warm Regards,
Shirisha Pathuri
Renee JRenee J
Hi Shirisha,

Thank you so very much for the quick response! This error occurred when I ran the "Debugging" feature in the Flow Builder Process, so it wasn't happening to a specific AccountID or UserID, if that makes sense. 

Do I need to change this Process Builder Flow code? If so, how would you suggest I do this?

CREATE RECORDS: Create_ATM
Create one AccountTeamMember record where:
AccountAccessLevel = Edit
AccountId = {!var_AccID} (null)
CaseAccessLevel = Edit
OpportunityAccessLevel = Edit
TeamMemberRole = POC Rep
UserId = {!var_POCRepOnAccID} (null)

Thank you again for the consideration! 

 
ShirishaShirisha (Salesforce Developers) 
Hi Renee,

If you are trying to debug the flow then you will have to pass the input record Id to update the field.

Otherwise,if you are trying to create the record directly then you will have to give the values for the AccountId and UserId for which you have provided the values as per the below:

AccountAccessLevel = Edit
AccountId = {!var_AccID} (null)
CaseAccessLevel = Edit
OpportunityAccessLevel = Edit
TeamMemberRole = POC Rep
UserId = {!var_POCRepOnAccID} (null)

So,I would suggest you to add/pass the value for AccountId and UserId to create the record.

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.

Warm Regards,
Shirisha Pathuri
Renee JRenee J
Hello, 

It keeps telling me an unhandled fault has occurred - do I need to change something in my code?

Again, thank you for the help!