web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Page :: Query D...
Power Apps
Answered

Custom Page :: Query D365 Table

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

 

I am trying to execute a 'retrieve multiple' request from a custom page when I click a button.

 

I have been playing with PowerFX and ClearCollect and various other techniques without success.

 

Unlike a canvas app, I cannot see a FetchXML or method to call an API URL directly?

 

What is the best way to perform a retrieve multiple for the contact's table, for example via a custom page?

 

The below works to some extent - but it's not what I'm after. Is there another way?

 

 

 

ClearCollect(
ContactsCollection,
Contacts
)

 

 

 

The below don't appear to work in custom pages:?

 

 

ClearCollect(
 ContactsCollection,
 'https://<your_organization_name>.crm.dynamics.com/api/data/v9.1/contacts?$select=fullname,emailaddress1,telephone1'
);

 

 

 

ClearCollect(
 ContactsCollection,
 FetchXML(
 "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
 <entity name='contact'>
 <attribute name='firstname' />
 <attribute name='lastname' />
 </entity>
 </fetch>"
 ).value
);

 

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @h4x0rz3d ,

     

    Please try this:

    ClearCollect(
     ContactsCollection,
     ShowColumns(Contacts,fullname,emailaddress1,telephone1)
    );

     

    This has the same effect as the api you mentioned above.

     

    Best Regards,

    Wearsky

  • h4x0rz3d Profile Picture
    8 on at

    Hi Wearsky,

    I am getting "The function 'ShowColumns' has some invalid arguments." when trying this.

    Thanks,

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @h4x0rz3d ,

     

    Double quotes are missing in my formula.

    Here is the documentation.

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping

     

    Best Regards,

    Wearsky

  • h4x0rz3d Profile Picture
    8 on at

    Thanks very much.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard