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
Holly Havelka 10Holly Havelka 10 

Help with Visual Flow Error

Hi all,

I need help figuring out why my visual flow is failing.  Here is the email error information:

Flow Interview Details
Interview Label: Sharing Contact with Breakthrough Role Associated BT Site 2/28/2018 11:37 AM
Current User: Holly Havelka (00533000004LpP0)
Start time: 2/28/2018 11:37 AM
Duration: 0 seconds

How the Interview Started
Holly Havelka (00533000004LpP0) started the flow interview.
Some of this flow's variables were set when the interview started.
varAssociatedBTSiteName = Atlanta
varAssociatedContact = 0031D000003HipNQAS

RECORD QUERY: Lookup_Associated_BT_Site_Role_ID
Find one UserRole record where:
DeveloperName Equals {!varAssociatedBTSiteName} (Atlanta)
Result
Successfully found record.
{!varAssociatedAffiliateSite} = 00E40000000kkg8EAA

RECORD CREATE: Share_Contact_Record_with_Associated_Affiliate_Site
Create one ContactShare record where:
ContactAccessLevel = Read
ContactId = {!varAssociatedContact} (0031D000003HipNQAS)
RowCause = Manual
UserOrGroupId = {!varAssociatedAffiliateSite} (00E40000000kkg8EAA)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: User/Group ID: id value of incorrect type: 00E40000000kkg8EAA.
Best Answer chosen by Holly Havelka 10
Santosh Reddy MaddhuriSantosh Reddy Maddhuri

Hi Holly Havelka 10,

In the following code snippet

UserOrGroupId = {!varAssociatedAffiliateSite} (00E40000000kkg8EAA)

You are sending in User Role instead of user  or group id. This is the root cause for your error.Correct this and it should be good to go.

FYI.. user start with 005 , group with 00G and user role with 00E.

Mark this as correct answer if it helps you, so other can benefit.

Regards,

Santosh