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)

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

I have the same question (0)
  • Suggested answer
    LMP Profile Picture
    680 on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

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

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

    {

    }

  • Suggested answer
    oliver.rodrigues Profile Picture
    4,052 on at

    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
    Community Member Profile Picture
    on at

    Dear All Friends

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

    Kind Regards

    Anil

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