Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Calendar Component / Creating New Record from Subgrid only prepopulates Start Date

(0) ShareShare
ReportReport
Posted on by 5

On one of my entities I have created a subgrid with a calendar component. It works find and displays everything as intended the only issue I currently have is that you can click on any day and the calendar will open a new form for the related entitiy and will preset the start date but will not prefill the other fields that have been mapped trough1:N relationship. If I click on the create new button on the subgrid it all works fine and the mapping works correct.

Could it be that the calendar currently does not support relationship mapping?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Calendar Component / Creating New Record from Subgrid only prepopulates Start Date

    Hello,

    If my reply (or replies) answers your question take a minute and verify the answer. You can do it by clicking "Yes" at the top of the reply (or replies) under the label "Does this answer your question?"

  • A.for.Alexej Profile Picture
    A.for.Alexej 5 on at
    RE: Calendar Component / Creating New Record from Subgrid only prepopulates Start Date

    Indeed this looks like a limitation. The funny thing is looking at the calendar source it does use the openForm function and seems to pass data trough a parameter as you would expect. I guess the client api simply Lacks the ability to retrieve the relationship mapping.

    Anyway the solution you provided is the way to go I cam up with something similar yesterday. I created a hacky script that is run once the user interacts with the calendar iFrame by clicking anywhere. This script will store the data I want to prefill inside the local storage. Another function then will try an determine if this local storage item exists and if the user opened the opportunity form from subgrid. There is a variable in window.history and if you open the form from the calendar there is a data object that contains only one key for the event start date I believe this is how openForm passes the data parameter to another form. If people are interested I might end up posting an example.

     a33ik Thank you for your help!

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Calendar Component / Creating New Record from Subgrid only prepopulates Start Date

    Hello,

    I believe it's one of OOB components and it might be a limitation of it. The only way I see is to implement that mapping in JavaScript in Quick View form. Check this - butenko.pro/.../ it might help with getting the parent record (no guarantees though) and based on that data you can query data of the related record and populate mapped fields. Not citizen-developer-friendly but it is what it is.

  • A.for.Alexej Profile Picture
    A.for.Alexej 5 on at
    RE: Calendar Component / Creating New Record from Subgrid only prepopulates Start Date

    I added a new tab and a subgrid inside a form and under the section components I added "Calendar"

    Screenshot-2022_2D00_12_2D00_07-203539.png

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Calendar Component / Creating New Record from Subgrid only prepopulates Start Date

    Hello,

    Which component do you use?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans