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 / How to set entity valu...
Power Pages
Answered

How to set entity value using liquid

(0) ShareShare
ReportReport
Posted on by 175

Hello,

How to set back updated value for any field (CDS entity) ?

I am trying following  liquid code but failed to set value

 {% assign account = entities.cr305_vendors['8d0b431e-97c6-ea11-bf21-0003ff906c75'] %}
{% if account.cr305_vendor_name == 'sample name' %}
 {% assign account.cr305_password = 'abc1234' %}
{% endif %}
Categories:
I have the same question (0)
  • H V Profile Picture
    1,510 on at

    Hi @Dhananjay_Patil 

    You can not update a field using liquid code in PowerApps Portal. 

     

    entities: Allows you to load any Power Apps entity by ID

    MS Doc: https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#entities

  • Dhananjay_Patil Profile Picture
    175 on at

    @hardikv 

    any other options to set entity value using code?

  • H V Profile Picture
    1,510 on at

    Hi @Dhananjay_Patil 

    Yes, you can update field using power automate. 

    You need to create a HTTP TRIGGER power auto mate as per this doc and pass the password field value in JSON format. 

     

    In power automate, you can get password field and update in your entity. 

    -------------

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

     

  • Dhananjay_Patil Profile Picture
    175 on at
  • Verified answer
    H V Profile Picture
    1,510 on at

    Hi @Dhananjay_Patil 

    Yes you can implement that functionality. 

     

    webapi.safeAjax({
    type: "PATCH",
    url: "/_api/accounts(00000000-0000-0000-0000-000000000001)",
    contentType: "application/json",
    data: JSON.stringify({
    "name": "Sample Account - Updated"
    }),
    success: function (res) {
    console.log(res);
    }
    });

     

    You have to also add Wrapper AJAX function for CSRF token code from the given link. 

  • Verified answer
    oliver.rodrigues Profile Picture
    9,425 Most Valuable Professional on at

    first make sure your portal has the early upgrade option checked

    webapi is only available if your portals is on version 9.2.6.41 +

     

    you can check the version in the clear cache page as well

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Dhananjay_Patil Profile Picture
    175 on at

    @hardikv 


    I am trying with same code from below link 

    https://docs.microsoft.com/en-us/powerapps/maker/portals/web-api-perform-operations


    but getting Web API not found error everytime , Error Code: 404

    I already tried all settings from given linked

  • oliver.rodrigues Profile Picture
    9,425 Most Valuable Professional on at

    @Dhananjay_Patil did you check your portal version?

  • Dhananjay_Patil Profile Picture
    175 on at

    @OliverRodrigues 

    Yes I checked , unfortunately its 9.2.5.15

    But when I create new portal be default its version is 9.2.5.15 and when my team member created portal he got version  9.2.6.58

    How to create portal with latest version i.e. 9.2.6.58?

  • oliver.rodrigues Profile Picture
    9,425 Most Valuable Professional on at

    @Dhananjay_Patil you need to enable Portal for early upgrade: https://docs.microsoft.com/en-us/powerapps/maker/portals/admin/upgrade-portal

     

    but it might still take a few days/even a week for the Portal to be updated

     

    also note that Web API is still under preview, we don't know if it will change or anything, so be careful if using in Live environment 

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!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 21 Super User 2026 Season 1

#2
CN-06091549-0 Profile Picture

CN-06091549-0 18

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 17 Most Valuable Professional

Last 30 days Overall leaderboard