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 Pages / Get Fields after creat...
Power Pages
Answered

Get Fields after create request

(0) ShareShare
ReportReport
Posted on by 27

Hello everyone,

 

So I am using API requests in my Power Page website. 

When I make an API call for creating a new record, it is usually in the form below:

 

    webapi.safeAjax({
        type: "POST",
        contentType: "application/json",
        url: "/_api/cr2f7_tablename",
        data: JSON.stringify(record),
        success: function (data, textStatus, xhr, res) {
            var result = data;
            var newId = xhr.getResponseHeader("entityid");
            console.log(newId);
        },
        error: function (xhr, textStatus, errorThrown) {
            console.log(xhr);
        }
    });

Below is a screenshot containing my primary column name values and the id generated:

Amad233_0-1705758829524.png

As you can see I have an auto number field as primary column name, after the create request I need to retrieve this value.

With the code provided above, I am only getting the GUID, how do I get the other value??

Or any other value apart from the GUID.

 

I know I can retrieve it easily by making another API call, is there a way to get it in the response itself just like the GUID??

 

 

Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at

    Hi, unfortunately the results object only returns the GUID of the newly created record, so you will need to perform a Get/Retrieve to get more details of the record.

  • Amad233 Profile Picture
    27 on at

    Exactly what I feared.

    Thank you for clearing that up.

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 Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
Valantis Profile Picture

Valantis 46

#2
11manish Profile Picture

11manish 46

Last 30 days Overall leaderboard