Hi all,
I want to build a flow to link parent and child records of same entity. Here is the scenario, I have entity A. When a new record is created in entity A it will check for duplicate record using "List rows" connector, if record already exist then i want to add newly created record(child) to already existing record(parent). How can I do this?
I tried to use "relate rows" connector, but i am getting error as Action 'Relate_rows' failed.
Thanks....
What is the relation between Parent and child is it 1:N?
Yes.. It is 1:N relationship. When I am creating records in entity it is linking correctly, But when testing in flow it is throwing error as
Sometimes its working fine, sometimes showing error. I dont know what is wrong.
Thank you...
Can you please add a screenshot to the step where u create the child record and how you are setting the lookup?
To set a lookup ok the child entity you do not need to use relate rows , Relate rows for N:N Relationships
so while creating your child set the lookup to the parent as below:
/parentshemanameinplural/ParentGUID
To get your parent Schema Name, go to make.powerapps.com and go to tables -> Select your Table and Click Settings
Note: SchemName while passing lookup should be in Plural+ Lower Case
@Mira_Ghaly Thank you
I was able do it. But I want all the child records to have single parent.
But in my case i set Top Count as 2, so 1st child will have 1st existing record as parent and all other childs will have child 1 as parent...
If i set Top Count as 1, then no parent record will be atteched to the child..
How to achieve this?
Can you share screenshots of your flow so that I can understand the issue?
Here is my flow
The problem is if i choose Top count as 1 in List rows, the results of conditions in 'Apply to each' will be 'true'.....Even if all the values are correct to get the false result.
And I am trying to update the record from the 'when a row is created' trigger
I have created a look up field called parent claim with N:1 relationship and trying to update that field with record from List row action.
BUT i am getting NotFound error in Update action.
If I use the delete action with Same GUID, it is working. But only Update action is not working.
And if I try to delete the record which i got from list rows, it is deleting the record successfully,
But if i try to delete the record from 'when a row is created' trigger, it is deleting but in showing error in Apply to each condition as ActionFailed. No dependent action succeeded.
Sorry for posting more than one thread here.
I am new to Dynamics and I am not getting what is wrong with my flow.
Thank you...
Here you need to pass only the Id , which is the id from List Rows so Just pass GUID because this is the ID of the record and not a lookup
Have you managed to fix the above issue?
Hi @Mira_Ghaly
No, the issue is still there..
And i will get error with all the connectors.
Now I created a new flow using CDS connectors and it is working fine. Previously I was using CDS(Current environment) connectors.
This below expression is also not working for me with CDS (Current environment) connectors.
length(outputs('List_rows')?['body/value']) is equal to 0.
I will again try to build a new flow with (Current environment) connectors and will update here if I can able solve the issue.
Thank you...
User | Count |
---|---|
94 | |
47 | |
21 | |
19 | |
17 |
User | Count |
---|---|
143 | |
53 | |
42 | |
40 | |
31 |