Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Using Xrm.WebApi.offline in PCF control

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




Super User
Super User

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:

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,



Thanks a lot for the response.

The way I am currently doing is 

await contextProps.contextObj.webAPI
    .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. 

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 ,



Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,401)