Transcript:
0:00 [Music]
0:04 I'll Patrick here again in previous
0:08 videos we've seen how to use fine value
0:10 functions and how to use an update
0:12 record function this time we are going
0:14 to take it a little further and use a
0:16 for each record function for each record
0:20 that's exactly what its name implies for
0:22 each record do something it comes in two
0:25 parts the first is the find part where
0:28 you create your entity collection to be
0:30 worked on the for each record will then
0:32 loop through this collection of records
0:34 and carry out the second instruction
0:36 against each record for this example
0:39 we're going to update the addresses of
0:41 all contacts related to an account when
0:44 the accounts address is updated so we
0:48 start by creating a new formula it's
0:51 going to be on the account of type save
0:54 perform action and we are going to use
0:56 the classic editor
1:01 we will use the snippets drop down
1:03 together started with our for each
1:05 record a find records function will
1:08 return multiple records to be worked on
1:11 we delete the example provided and click
1:14 on the functions tab we search for find
1:17 records and then hold down the shift key
1:19 and click on the function to bring up
1:22 the wizard we are looking for contacts
1:25 where the parent account is this account
1:28 so we select this account from the
1:31 source tab the star means this will
1:34 return every field on each of the
1:36 contacts found but in this scenario the
1:39 only value we want back from the
1:41 contacts is their good so we select only
1:43 contact we've no lock set to true and
1:47 the record count at 50 when we click
1:50 generate the function is added to the
1:53 formula canvas
1:55 this will give us our list of contact
1:58 records to be updated so now we need to
2:00 actually update them we will delete the
2:03 existing sample and instead use the
2:05 update record builder that can be found
2:08 in the Explorer tab
2:12 we select the fields on the contact
2:15 entity that we want to change in this
2:18 scenario we will be updating the value
2:20 of city country and the tree street
2:24 address fields and the postal code in
2:27 the top right hand corner we select the
2:30 update record on the pick list and then
2:32 click the arrow to generate the update
2:35 record syntax is now added directly to
2:38 the formula canvas the for each record
2:41 will carry out the update against each
2:44 record it finds in the find record
2:46 function what we have now is an entity
2:48 collection that is basically a list of
2:51 contact records we can use a current
2:55 record function to access a specific
2:57 value inside each of these entities
3:00 since we are looking at contact codes we
3:03 will use current record contact ID this
3:09 update record function now knows it
3:11 needs to update a contact the specific
3:14 contact to be updated it will be
3:15 whichever good is the for each record is
3:17 currently iterating over so next we want
3:20 to start replacing the value
3:22 placeholders in the cell attribute
3:24 functions with the address values from
3:26 the account
3:32 now that the formula logic has been
3:34 added we need to specify when the
3:36 formula should trigger
3:37 so we navigate to the register tab we
3:40 leave the event at create and update and
3:42 we set the trigger feels to be the
3:44 relevant address fields on the account
3:47 we save the formula and after the save
3:50 completes we run the syntax checker this
3:53 formula is now active in our dynamics
3:55 instance
3:57 on this screen I have an account that is
4:00 five contacts connected to it this
4:03 advanced find shows the contacts and
4:04 their various address information if I
4:07 make a change to an address field on the
4:10 account and then click Save you can see
4:13 that this has now been replicated out to
4:14 the contacts
4:21 thank you for watching and as always if
4:24 you have any questions or need any
4:26 assistance please visit
4:27 support.norton.com or email support at
4:31 North52 com
