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 / Update Record After AP...
Power Pages
Answered

Update Record After API Request Confirmation.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I have Entity list A which contains status value Open/Close. At first when a new record is created from power automate to CDS, status value is Open in an entity. 

 

I want to update an entity status value Close  after confirmation of an API request.

 

Note: I don't have entity form or web from to update an entity list in CDS.

 

Regards.

Ahmad.

Categories:
I have the same question (0)
  • Verified answer
    H V Profile Picture
    1,510 on at

    Hi @Anonymous 

    First you need to create New Power Automate flow, which will close the invoice.

    https://www.inogic.com/blog/2019/10/how-to-run-microsoft-flow-through-custom-ribbon-button-using-htt...

    https://readyxrm.blog/2019/12/28/trigger-power-automate-flows-from-power-apps-portals/

     

    When you will get a message "your transaction successfully submitted", then call the powerautomate and pass invoiceid using javascript:

    function CloseInvoice(){
     var objInvoice = {};
     //put your invoice id
     objInvoice.invoiceid = "349da56c-93e3-4daa-b452-ddf2b7293u87";
     
     var stringJSON = JSON.stringify(objInvoice);
    
     var httpTriggerUrl = "https://prod-29.westus.logic.azure.com:443/workflows/5192b9bc428746ec93b21e6c8f9d0fe7/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=";
    	
     $.ajax({
     type: "POST",
     contentType: "application/json; charset=utf-8",
     datatype: "json",
     url: httpTriggerUrl,
     data: stringJSON,
     async: true,
     beforeSend: function (XmlHttpRequest) {
     XmlHttpRequest.setRequestHeader("Accept", "application/json");
     XmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
     XmlHttpRequest.setRequestHeader("OData-MaxVersion", "4.0");
     XmlHttpRequest.setRequestHeader("OData-Version", "4.0");
     },
     success: function (data, textStatus, XmlHttpRequest) {
     alert("success");
     },
     error: function (xmlHttpRequest, textStatus, errorThrown) {
     alert(xmlHttpRequest.responseJSON.error.message);
     }
     });
    }

     

    --------------------------
    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 50

#2
Valantis Profile Picture

Valantis 26

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard