Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Using Xrm.WebApi.offline in PCF control

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

 

I am developing a PCF control and the requirement is to make it work in the offline as well in the mobile app. I am trying to use

Xrm.webApi.offline.retrieveMultipleRecords but when I was debugging I was unable to find the offline keyword, wanted to know if this is really supported or If I am missing anything.

Please help

 

Thanks

Shayan 

  • Shayanrs31 Profile Picture
    8 on at
    Re: Using Xrm.WebApi.offline in PCF control

    Hi Diana, 

     

    I did try to check the control in offline mobile but the control isn't visible any idea what I could be missing or is pcf control supported offline ? 

     

    Many thanks ,

     

    Shayan 

  • Shayanrs31 Profile Picture
    8 on at
    Re: Using Xrm.WebApi.offline in PCF control

    Thanks a lot for the response.

    The way I am currently doing is 

    await contextProps.contextObj.webAPI
        .retrieveMultipleRecords("account",fetchXml)
        .then(successCallback, errorCallback);
     
    this works fine online and was looking if there is any alternative for offline as in the XRM object.
    will test it and comment back. 
     
    Regards
    Shayan
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Using Xrm.WebApi.offline in PCF control

    Hi @Shayanrs31 , 

    Inside a PCF it's not supported to work with the Xrm object.

    In order to use the webAPI, you need to enable the webAPI feature in the manifest:https://docs.microsoft.com/en-us/powerapps/developer/component-framework/manifest-schema-reference/uses-feature

    Then you will get the context.webAPI (Context - Power Apps | Microsoft Docs) for making webAPI requests.

    This should work offline too (didn't tested it yet though), but is available only for model-driven apps.

    Kind regards,

    Diana

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard