Notifications
Announcements
No record found.
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?
Hello,
Which component do you use?
I added a new tab and a subgrid inside a form and under the section components I added "Calendar"
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.
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!
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 72 Super User 2025 Season 2
Daniyal Khaleel 32 Most Valuable Professional
Gerardo RenterÃa Ga... 29 Most Valuable Professional