web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

How do we retrieve back created id once user saved the form in openForm sdk for CIF v1.0?

(0) ShareShare
ReportReport
Posted on by 2
I have this code to open a form to create a new contact,
 Microsoft.CIFramework.openForm(JSON.stringify(ef), JSON.stringify(fp)).then(function (resultStr) {
 let result = JSON.parse(resultStr);
 console.log(result);
         //Once the form is opened and saved, CIF will return the newly created recordId. Save it for later use
         result[/savedEntityReference/].forEach(function (elem) {
        // do something here
        });
 }); 
 
Based on this sample, CIF will returned savedEntityReference object but at this point the form is not saved yet so there is nothing useful returns in this object as you can see here:
My question is, how do I retrieved back the created id once user clicked save button in the form? I am new to this and quite embarassingly not very good in javascript. Any pointers is appreciated.
 
I have the same question (0)
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    I found a client API Xrm.Navigation.openForm() with similar behavior to Microsoft.CIFramework.openForm().
    openForm (Client API reference) in model-driven apps - Power Apps | Microsoft Learn
     
    When I open a new form using this API, it returns a savedEntityReference without the entity ID
     
    However, when I choose to open a Quick Create Form using the useQuickCreateForm property, a savedEntityReference with the entity ID is returned only when the form is saved.
     
    This property is also available in the entityFormOptions of the Microsoft.CIFramework.openForm api.
    Therefore, you can try using the property to see if savedEntityReference is able to return an entity ID.
     
    Best Regards,
    Dengliang Li

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 74

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans