Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Setting form fields from child based on parent data (workflow?)

Posted on by Microsoft Employee

Hi,

I have an Event entity where the activities have been enables so users can add appointments to this entity (and sync them in outlook).

Obviously, the regardingid is automatically set due to the mapping functionality. But what about the other fields?

- Example: I have an appointment Type that needs to be set to Event. Can I somehow create a workflow so whenever a new appointment is created from the event entity, the fields of the appointment are populated with certain values, either fixed or either dynamic from the parent (event)?

Do I create a workflow on the event entity or the appointment entity? - How do I set the fields when the child is created?

Many thanks in advance!

Regards,

Christopher

*This post is locked for comments

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: Setting form fields from child based on parent data (workflow?)

    If you are creating or adding an appointment from the event form, oob mapping will work

    If you are creating appointment independently and then filling regarding event, workflow will work after save

    If you want the values to populate before save, u can either write a JavaScript or precreate plugin

    www.google.com.au/.../amp

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Setting form fields from child based on parent data (workflow?)

    Ok, so that works, but unfortunately not a solution. The fields should be populated onload (when the appointment screen open us) so the user should only change a limited amount of details. Can workflows do this, or does this need to be done through:

    a) javascript?

    b) passing URL variables to the new screen (not sure how that would work though)?

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: Setting form fields from child based on parent data (workflow?)

    Change the scope to organisation

    You will have to save the appointment to get the  values populated

    I hope you have created a real time workflow

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Setting form fields from child based on parent data (workflow?)

    The problem here is that the mapping is not always directly the same data type. So for example, if the regarding field is an event record, I need the appointmentType field to be set to Event. So I tried the answer from Prashant, but nothing is updating currently.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Setting form fields from child based on parent data (workflow?)

    I tried this, but nothing is being updated when I create/add an appointment from the event 'activities" menu.

    The scope is currently set to User. Could this be the issue?

    PS: also tried created an appointment from scratch and set an event in the regarding field ... also nothing happens.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Setting form fields from child based on parent data (workflow?)

    Hi Christopher,

    +1 for Prashant's suggestion.

    Another method is to create a field mapping in the 1:N relationship.  You can open the 1:N relationship between Event and Appointments from Event's 1:N relationship list. On the left pane click Mappings.  Click new to map a new set of fields.  Please see below example.  This is useful when using CRM UI to create Appointments from Event.

    6237.Field-Mapping.PNG

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: Setting form fields from child based on parent data (workflow?)

    Create a workflow (realtime)

    Trigger it on appointment creation

    check condition, if Regarding (Event) created on contains data

    Update Appointment>>Set  Properties>>map event fields to appointment here

    Activate

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans