Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Custom Page is opening on command click but not loading fields

Posted on by 35

Hello,

currently my custom page looks like on this screenshot, its opening on clicking the command

but its not loading the fields I added.

pastedimage1682364289095v1.png

Originally it looks like this

pastedimage1682364388846v2.png

1. I saved and published everything, 

2. I added it to the Model driven app

3. And the code to open via command looks like this

function openCustomPage(pageContext){

    Xrm.Navigation.navigateTo({

       pageType: "custom",  
       name: "skt_itdecline_8da2b",  
       entityName: pageContext.data.entity.getEntityName(),  
       recordId: pageContext.data.entity.getId()

    },
    {
    target:2,
    width: 400,
    height: 600
})
.then(function(){
    pageContext.data.refresh();
})
.catch(console.error);
}
  • smar.sus Profile Picture
    smar.sus 35 on at
    RE: Custom Page is opening on command click but not loading fields

    That worked perfectly !!!!

    Thank you so much

  • Suggested answer
    XM-22040801-0 Profile Picture
    XM-22040801-0 11 on at
    RE: Custom Page is opening on command click but not loading fields

    Hi,

    Can you try to replace :

    recordId: pageContext.data.entity.getId()

    by

    recordId: pageContext.data.entity.getId().replace(/[{}]/g, "");

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans