Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

javascript get form type quick create or entity form

(0) ShareShare
ReportReport
Posted on by 2,397

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

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: javascript get form type quick create or entity form

    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

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: javascript get form type quick create or entity form

    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.

  • sdnd2000 Profile Picture
    sdnd2000 2,397 on at
    RE: javascript get form type quick create or entity form

    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

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: javascript get form type quick create or entity form

    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.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=thre+free+ho+ke+call++all+msg++kr+dena+ok++dena+na+hi+call++kabhi+bhi+++abhi+msg++mat+books+++plan+gya+h++h+++a+se+be++are+the++member+help++jio+broke++me++in++in+group+for+joining+" - Nested quantifier +.