+ Start a Discussion
BobPBobP 

The flow failed to access the value AccountId because it hasn't been set or assigned.

I have a screen flow that is giving my a headache. No matter what i do to change the variable to set the account from a contact it is still giving me this error.
The flow failed to access the value for Get_Contact_Id.Account.Id because it hasn't been set or assigned.
I am trying to create a record from a contact record for a custom object but I cant figure out why it isnt setting the AccountId from my Get Contact Id element
User-added image
Create record element
User-added image

 
Naveen KNNaveen KN
have you tried just with {!get_contact.AccountId} instead of get contact > accound id > account id 

please try this and let us know if it works.
 
BobPBobP
Hi Naveen, 
Similar message Error Occurred: The flow failed to access the value for Get_Contact_Id.AccountId because it hasn't been set or assigned.

Naveen KNNaveen KN
it might be not getting the contact record and we are trying to access the account id from the null contact object. Please debug flow directly and check each node output. 
BobPBobP
User-added image
User-added image
Naveen KNNaveen KN
I see transactions committed. Did it throw the error which you mentioned in the question description while debugging the flow?

and one more observation - why are we again querying the account object. As we get Account Id from the Contact query, directly we can use that acccountId to create a compliance record?