Import and Map Associations in Microflow

0
I’m importing my data from an API and then calling a microflow trying to update any and all associations.   My microflow is not erroring, but it’s also not creating any associations.  Here’s is my process.  My data is imported from a Call Rest [entity 1], and I iterate through all records.  For each record, I retrieve the entity in which I wish to create the association with from the database [entity 2].  This seems correct, because if I receive by association, the record returns null. I don’t seem to be able to change a null object and if I create a new object, them I’m actually creating duplicate records in entity 2 which is not what we’re trying to do here.  So I retrieve from database, which gives me the correct record that I want to associate with.  However, here’s where I’m stuck.  If I perform a Change Object on entity 1 then I’m just updating entity 1 and if I do a Change Object on entity 2 then I’m just updating entity 2.  In no way is this creating an association.  There is no Object available in the Change Object drop down that is the association entity of the iterator object – because I did not retrieve by association.  If I do and try to update it, I get an error trying to update an empty entity [An error has occurred while handling the request.].  What am I missing on trying to create these associations?  I tried to divide it into two microflows (REST call separate from iteration) since the issue may be that the data was not yet in the database and therefore associations not available to be created, but that didn’t help.  In the below microflow, Vision System Terminal is being updated in entity 1 only [no association being created] and Model is erroring because it’s null and doesn’t exist.  I am aware it doesn’t exist, I’m trying to create it!  
asked
2 answers
0

Hi Teresa Buchanan,

Can you paste a Screen Shot of what you are doing in the microflow and the domain model of the two entities ?

answered
0

I found someone to help me figure out what my issue was.  I was updating the wrong object (obv).  I didn’t need to be updating the retrieved object, but the current object – and I didn’t realize you could choose the associations as a member inside of Change Object. This is how they are created.

answered