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

Event checkin - QuickCreate lookup view issue

(0) ShareShare
ReportReport
Posted on by 6

Hi guys,

I can't change the default view "msevtmgt_event...." for the registration lookup on quick create for a event check-in. The view is not customizable by myself. Event I set another view - the default view stays the same. It seems like a bug.

DefaultViewWorkaroundOnForm.PNG

Any suggestions?

Regards,

Martin

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi Martin,

    Not sure whether the default msevtmgt_eventregistration_by_msevtmgt_event (default) view is customizable, because it is used to show all event registration records that are associated with current event, 

    therefore, it is recommended that not to customize it.(And it seems that the view is hardcoded.)

    Could you let me know how did you change the default view?

    From my test, in powerapps editor > entities > check-ins > quick create form, we can change the default view and allow users to change view.

    pastedimage1603186996577v1.png

    pastedimage1603187033312v2.png

    Make sure that you have saved and published the form, and try to refresh page twice to check again.

    Regards,

    Clofly

  • MaSc4Crm Profile Picture
    6 on at

    Hi Clofy,

    yes - we have published it. The Problem is, by default the "hardcoded" view is set always. If we change the view, we are losing the filter ("filtered by related contacts").

    This behavior only appears on this lookup field - There is no customization or coding from us.

    My requirements are: Either change the columns of the default view or change the default view.

    Regards,

    Martin

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Martin,

    You could inject custom layoutXml and fetchXml to the Event registration field by executing the custom javascript function at OnLoad event of quick create form of Check-in.

    pastedimage1603273955321v1.png

    Sample code:

    function customView(executionContext) {
    
        var eventId = new URLSearchParams(location.href).get('id');
    
        var formContext = executionContext.getFormContext();
    
        var fetchXml = ''
              ''
              ''
              ''
              ''
              ''
              ''
                  ''
                      ''
                          ''
                      ''
                  ''
              ''
              '';
    
        var layoutXml = ''
              ""
                  ""
                  ""
                  ""
              ""  
            "";
    
        formContext.getControl("msevtmgt_registrationid").addCustomView('6db26390-685a-4d19-a274-aeaa771f1b5c', 'msevtmgt_eventregistration', 'Clofly View', fetchXml, layoutXml, true);
    }

    It will inject a custom view with custom layout(custom columns) to the event registration field and set it as the default view.

    We can add columns we want to the layoutxml cell node, but they should have been queried from fetchxml.

    (Columns I set: Registration ID, contact name and createdon date.)

    pastedimage1603273453770v2.png

    To only show associated records of the current event, we use following syntax to get id of the current event.

    var eventId = new URLSearchParams(location.href).get('id');

    The custom injected view will be available in the list.(It only exists on the quick create form and it will not affect the default "hardcoded" view.)

    pastedimage1603273637209v3.png

    Please refer to following articles to learn about addCustomView function and its example.

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/addcustomview

    https://www.c-sharpcorner.com/blogs/filtering-lookup-based-on-the-link-entity

    Regards,

    Clofly

  • Suggested answer
    MaSc4Crm Profile Picture
    6 on at

    Hi Clofly,

    your answer is quite good, but this part "var eventId = new URLSearchParams(location.href).get('id');" throws an exception, because "get" is undefinied.

    Instead of using the url I take the Guid of the event from the field on the form.

    Furthermore is "taking url params" a "supported" solution because we are working with DOM - don't we?

    Solution works!

    Regards,

    Martin

  • cloflyMao Profile Picture
    25,210 on at

    Hi Martin,

    Thanks for your feedback.

    I forgot that we need to take url params from "parent.location.href" instead of "location.href", because the script is running on quick create form.

    (Quick create form could be regarded as child page of the parent main form.) 

    Moreover, I didn't notice that Event field had been added to the Check-in quick create form by default.

    Therefore, obviously your method that taking Guid of the event from the field on the form is a better solution.

    In Dynamics, only client API(such as formContext.getAttribute) is the supported solution, however, "Taking url params" may works for situation when lookup field for parent entity is not added to quick create form.

    Anyway, it is very glad that your problem has been solved.

    Regards,

    Clofly

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 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

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

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans