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)

javascript get form type quick create or entity form

(0) ShareShare
ReportReport
Posted on by 2,510

Hi, how to tell form type (quick create or entity form) through javascript?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi,

    Use Xrm.Page.ui.getFormType() to get the Form Type.

    The result of 1 will be FORM TYPE CREATE.

    If you have Quick Create enabled on the form, then when the Quick Create is open you will get the result of FORM TYPE CREATE. If you do not have Quick Create enabled, then the Entity form will result in one if this is a new form, and not an Update form.

    Hope this helps.

  • sdnd2000 Profile Picture
    2,510 on at

    Hi, Aric,

    I understand that. I have both entity form and quick create form, so when I open either form, it always returns 1 , but I can not tell whether it is quick create or entity form

  • Verified answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    There is no real way using an SDK function to tell the difference between the forms using regular SDK functions.

    You are probably able to get that functionality by checking values of particular fields.

    For example the quick create form will not have a particular field. You can check if that field returns a value, and based on that know on which form you are.

  • Suggested answer
    Community Member Profile Picture
    on at

    Try to use Xrm.Utility.getGlobalContext().getQueryStringParameters().pageType method.

    If we try to create the record through Quick Create the output is : quickcreate

    If we are using Main forms then output is : entityrecord

    Try to validate this using console

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