web
You’re offline. This is a read only version of the page.
close
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?

I have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Which component do you use?

  • A.for.Alexej Profile Picture
    5 on at

    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

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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
    5 on at

    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!

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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?"

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 29 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans