Create power automate on account city change and update the city in related contacts.

Create power automate on account city change and update the city in related contacts.

Hear we are update the city of account and check weather the city was changed in contact or not

for that follow those steps.

1.First of all you should create an instance flow in power automate.

Next we are updating so in data verse( When a row is added , modified and deleted ) we should take type as modify , table as account, scope as organization and select columns as address_city1.

2.Now in list rows fist take contacts in table name then in fetch_XML take fetch_XML code according to the filter and make some changes then use it .

3. Now take apply to each step in that from dynamic context take value (*list rows*).

4. Now take update step to update the city name in contact for that take table name as contacts in row id take contact and address 1: city in dynamic content.

5. Then run the flow and check manually it is working or not.

 

Step 1: Go to power app then power automate and create an instance flow.


Step 2: Add a trigger with When a row is added , modified and deleted.


Step 3: Now you should take type as modified , table as accounts, scope as organization and select columns as address_city1.

 

Step 4: Take a list rows then in table name give, now in fetch_XML take fetch_XML code according to the filter.

For fetch_XML go to advance find write a filter now download fetch_XML and make some changes then use it.

 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

  <entity name="contact">

    <attribute name="fullname" />

    <attribute name="telephone1" />

    <attribute name="contactid" />

    <order attribute="fullname" descending="false" />

    <filter type="and">

      <condition attribute="parentcustomerid" operator="eq" uitype="account" value="@{triggerBody()?['accountid']}" />

    </filter>

  </entity>

</fetch>



 

Step 5: In next step add apply to each step in that from dynamic context take value (*list rows*)


Step 6: To update the city name now Add an action and take Contacts for table name then in row id take contact and in address 1: city in dynamic content check for address 1: city from When a row is added , modified and deleted.



 


Comments

Popular posts from this blog

If any case created, then check for the same user how many cases are created with in 30 days, if more than 2 and less than 5 send a mail to team lead, if more than 5 and less than 9 then send a mail to manager using power automate.

Create approve & reject ribbon buttons, once click on approve it should change the status field to approve.If clicked on reject it should change to Reject. Based on status field change trigger work flow to send a email to stating request is approved/Rejected.

How to get and set values in plugins?