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 CRM (Archived)

quick create form save button callback

(0) ShareShare
ReportReport
Posted on by

Is there a way to execute custom code after the save has been performed through quick create?

I want to execute some other logic on the saved entity and so, i want the GUID of the newly created entity also.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi Aseem,

    You can add your javascript (or any other logic) on "onSave" event of quick create form.

    Hope this helps:)

  • Community Member Profile Picture
    on at

    This function is invoked *before* save event is propogated by dynamics.

    I want to execute javascript after dynamics has saved the record.

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at

    Hi,

    Following link may help you:

    community.dynamics.com/.../184537

    Check last two suggestions there.

    Thanks:)

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    why don't you use a postCreate plugin to achieve your requirements? It will be far more easier.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi, I know this is an old question, but I had the same problem and finally figured out how to do it so hopefully this will help someone else.

    You can use the onLoad event like this:

    formContext.data.addOnLoad(
      () => {
        // Get id
        let entityGuid = formContext.data.entity.getId()
        if (entityGuid) {
          // Id is available so now you can do something with it
          console.log(entityGuid)
        }
      }
    )

    This works because the onLoad event is fired on form load but also after the form is saved.

    Ref: docs.microsoft.com/.../form-data-onload

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans