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:

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??