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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Accessing Entity Via Code
Power Apps
Answered

Accessing Entity Via Code

(0) ShareShare
ReportReport
Posted on by 75

Hi 

 

I have created an entity as shown below 

1.PNG2.PNG

and trying to read the Entity using below code. But none of them are working

 

 
 context.webAPI.retrieveRecord("aaa1s","4661b90a-028c-e911-a84e-000d3ae02142","?$select=name").then(
 function success(result){
 alert(result.name);
 },
 function (error){
 console.log(error.message);
 });

 context.webAPI.retrieveRecord("aaa1","4661b90a-028c-e911-a84e-000d3ae02142","?$select=name").then(
 function success(result){
 alert(result.name);
 },
 function (error){
 console.log(error.message);
 });

 context.webAPI.retrieveRecord("crf65_aaa1s","4661b90a-028c-e911-a84e-000d3ae02142","?$select=crf65_name").then(
 function success(result){
 alert(result.crf65_name);
 },
 function (error){
 console.log(error.message);
 });
 
I have the same question (0)
  • Ben Thompson Profile Picture
    1,400 on at

    The code you need to use is 

     

    context.webAPI.retrieveRecord("entityTypeName","entityGuid", selectstatement);

     

    You've entered the entityName of the record there not the entityTypeName (which to be honest I think everyone does when they first start doing this).

  • GLMSDev Profile Picture
    75 on at
    What is this EntityTypeName? Is it custom? Can you please tell what should I be passing ??
  • Verified answer
    MannyGrewal Profile Picture
    40 on at

    Have you tried this?

     

     context.webAPI.retrieveRecord("crf65_aaa1",......);

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard