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 / Create a record in dat...
Power Pages
Answered

Create a record in dataverse on button click and go to the edit form of newly created record

(0) ShareShare
ReportReport
Posted on by 167

Hi All,

 

My problem is broken down into 2 challenges.

 

1. Create a record in the dataverse on button click. All the information needed is found in the current form that the user is in that the button was clicked on. I suppose this can be done through Flow or an Http Post Javascript action. If so which way is more common? Any resource or sample code as to how this is done is appreciated.

 

2. Upon button click, I would like the user to be transported to another web page (an edit form) showing the newly created record in step 1. The reason I specified an Edit Form is because the user still needs to add a few more values to some of the fields in the newly created record.

Categories:
I have the same question (0)
  • Verified answer
    Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    Would do it by using the Web APi behind a custom button.  Button click triggers Web API to create the record, on success redirect the user to an edit form with the id from the Web API response

    webapi.safeAjax({
    		type: "POST",
    		url: "/_api/accounts",
    		contentType: "application/json",
    		data: JSON.stringify({
    			"name": "Sample Account"
    		}),
    		success: function (res, status, xhr) {
     //print id of newly created table record
    			console.log("entityID: "+ xhr.getResponseHeader("entityid"))
     // your redirt code here 
    		}
    	});

    https://learn.microsoft.com/en-us/power-apps/maker/portals/write-update-delete-operations#wrapper-ajax-function

     

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

    "Create a record in the dataverse on button click. All the information needed is found in the current form that the user is in"

     

    Hi, which page / form is the user in? It sounds to me that you already have the form done, so once the user clicks on the submit button this will automatically be saved in Dataverse.

     

    If you are using Basic Forms, you can use the Redirect option to point the user to another page. Another option is to use Multistep Forms, so you can have a wizard/web form type of form.

  • gng Profile Picture
    167 on at

    The form the user would be currently at belongs to a detail page of different data source so no creating/updating would occur on the current form.

  • Inogic Profile Picture
    1,283 Moderator on at

    To create a record on button click and go to edit form of newly created record you can use OOB steps Shown below:

    Step 1) Consider we have contact list present on portal page.

    Add two basic forms, Mode of one form should be insert type and other should be edit type.

    Consider we have a list,

    So navigate to List as shown below screenshot -> Select your list and under General tab scroll down to Create Button Label add label to the button -> And Select Web Page for Create to open a web page which will redirect to insert form.

    Inogic_0-1671510251022.jpeg

    Step 2) On Insert Basic form move to On Success Settings tab ->

    After that go to Contact Entity Form and add below configurations in On Success Settings

    Configurations:

    • On Success: Redirect
    • or Web Page: Contact Edit Web Page(Select your own web page)
    • Append Attribute Value to Query String Parameter Name: id
    • Append Attribute Value to Query String Attribute Logical Name: contactid.

    Inogic_1-1671510251084.jpeg

    Step 3) Clear you portal cache and view the result.

    Click on Create button it will redirect to contact insert form

     

    Inogic_2-1671510251088.jpeg

     

    Inogic_3-1671510251095.jpeg

     

    Inogic_4-1671510251105.jpeg

    After adding details, click on submit button which will redirect to edit form.

    Inogic_5-1671510251191.jpeg

    • You can also achieve this using Web API operations, you can refer the mentioned below blog to achieve the same functionality.

    Blog for reference : https://www.inogic.com/blog/2021/03/execute-different-web-api-operations-using-powerapps-portals-preview/

     

    Hope this helps.

     

    Thanks!

    Inogic Professional Services

    An expert technical extension for your techno-functional business needs

    Power Platform/Dynamics 365 CRM

    Drop an email at crm@inogic.com

    Service:  http://www.inogic.com/services/  

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

  • SultanWasif Profile Picture
    6 on at

    Passing a foreign key ( relation ) column to another Basic form via custom query , but the redirected page is taking only Id not the foreign key and says no record found, how to solve this ?

     

    SultanWasif_1-1684662749447.png

     

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