Hope someone can help.
I have created a customized entity called Client Agreements and a related entity called Master Service Agreement (MSA). The MSA consists of multiple Client Agreements.
In both forms I have created a Notes box. I want to be able to sync the two fields, for example if a uses enters information in the client agreement Notes field it should bring them notes to the MSA notes field.
Which is the easiest way?
You can select 'Append With' when you are updating the note value so that it will always add on to the note field:
Hope this helps,
Read my Blog | Follow Me on Twitter | Rockstar365
it's tricky updating records when you have a 1 to many relationship because there isn't a way to do this using a workflow (because there is no concept of looping)
I would usually write a plugin to update the many.
The other way round you can use a plugin because there is only record to update and you can select this in a workflow
If the my post helped you please mark my post as the suggested answer
Hosk's Dynamic CRM Blog | @BenHosk | Rockstar365
Hosks CRM Dev YouTube Channel
So if the relationship between MSA and Client Agreements is 1:N (as you say the MSA has multiple client Agreements), you can create a Realtime workflow that runs when the client agreement notes field is updated and append the notes to the MSA notes field. See the following for a description of this technique - www.magenium.com/.../Aggregates.aspx
This does have the disadvantage that everytime the notes field is updated, you'll get a copy on the parent MSA record. Perhaps a better solution would be to show the notes field in the subgrid of Client Agreements on the MSA records.
Maybe you should try the assignation of fields, i think that's will be the best way for you to pass the value from A entity to B entity, go to customization, find your A entity and then check out the 1:N and then search for the field assign and creae tehe assignation for the A entity field to the B entity field and always get the complete value in both-
In your scenario the best way would be with a WF, when the note change go and update the related record in the same field. But it just would work if you Note Box is a text area Field called Notes or something like that. In other way probably you should try sending activities from your A entity to your B Entity.
Thanks for this guys,
I have set up a work flow, but I'm having an issue. If I add a note to one client agreement it updates the Notes field in the MSA however if I add another note in a different client agreement it overwrites the current one.
How can I overcome this challenge?
Set a condittional comparission in the WF, something like this:
IF entity A Client = entity B client then run the rest of the workflow, and when you do the update put the first note value like a dynamic value and next put the note value from the update entity.
Thanks for that, it was helpful :). However if I update the child record note it still keeps the original note in the MSA Notes field how can I let it update to the new content. Also is there a way to add the note on the next line of the MSA it seems to add the note right next to the previous one.