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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,198)