cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chigivigi08
Regular Visitor

Context Web Api RetrieveRecord method not implemented even with uses-feature WebAPI set

I have a created a simple RetrieveRecord example in my new pcf application:

 

I call the following function from init:

public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement)
{
this.makeRequestCrm(context);
}

 

async makeRequestCrm(context: ComponentFramework.Context<IInputs>) {
context.webAPI.retrieveRecord('account','xxxxx').then(
function success(result) {
console.log(result);
},
function (error) {
console.log(error);
}
);

 

I have set the web api feature in my input manifest xml:

    <feature-usage>
      <uses-feature name="WebAPI" required="true" />
    </feature-usage>
 
Is there something else I am missing ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
a33ik
MVP

@chigivigi08 where do you do your tests? It won't work in harness or in Canvas Apps but it should work fine in Model Driven App.

View solution in original post

2 REPLIES 2
Michaelfp
Advocate II
Advocate II

a33ik
MVP

@chigivigi08 where do you do your tests? It won't work in harness or in Canvas Apps but it should work fine in Model Driven App.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,583)