Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Determine whether the current record is a new record on Form Load

(0) ShareShare
ReportReport
Posted on by

Dear Support Team

It is request to please guide me how to find the following through JavaScript:

  • Determine whether the current record is a new record on Form Load.

Look forward to kind reply.

Thanks

*This post is locked for comments

  • Suggested answer
    RE: Determine whether the current record is a new record on Form Load

    Dear All Friends

    I am very thankful to (Uma Maheswaraiah Dasari, LMP and Oliver) for kind help and cooperation.

    Kind Regards

    Anil

  • Suggested answer
    oliver.rodrigues Profile Picture
    oliver.rodrigues 4,052 on at
    RE: Determine whether the current record is a new record on Form Load

    hi.. this is the community, not the support team

    is this within CRM or the Portals?

    if it is CRM you can get by the getFormType: docs.microsoft.com/.../getformtype

    if it is Portal you actually have in your Entity Form if it is an insert or update.. so you already know the information.. not sure what's the issue

  • Suggested answer
    RE: Determine whether the current record is a new record on Form Load

    var formContext = ExecutionContextObj.getFormContext(); // ExecutionContextObj is the event executioncontext

    if(formContext.ui.getFormType()==1) // 1 is for create

    {

    }

  • Suggested answer
    LMP Profile Picture
    LMP 678 on at
    RE: Determine whether the current record is a new record on Form Load

    Hi Anil,

    What do you mean by new record? A record that was recently created? You can get the record 'createdon' and get the current date and time then compare.

    You can also use getFormType. If the form is "Create" = New or "Update" = existing.

    You can refer to this microsoft page for more info.

    docs.microsoft.com/.../getformtype

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans