web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

FormType not returning proper value on dynamics 365

(1) ShareShare
ReportReport
Posted on by 65

I'm using the Dynamics 365 online

I find this form type can only return 1 and 2 status

But according to the MSDN, the return value will include

alueForm Type

0

Undefined

1

Create

2

Update

3

Read Only

4

Disabled

5

Quick Create (Deprecated)

6

Bulk Edit

11

Read Optimized (Deprecated)

For example:

1. Create custom entity ent_Test01

2. Set user role has only read access with Org level.

3. create a record with system administrator role

4. login the user who has only read access and open the ent_Test01 record

5. I will see there is a yellow bar on the bottom of the page " Inactive Readonly"

6. But the Xrm.Page.ui.getFormType() still return 2 (Update)

Can anyone tell me when I can get 3(Read Only) and 4(Disabled) value?

*This post is locked for comments

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

    When you open the record and it shows you the Inactive/Read Only, is the actual record Inactive or Active.

    If the record itself is not disabled, it will show you Update.

    Not sure why, but that is the way it has been working in Dynamics 365.

    You should check if the user has permissions to write using a different logic.

    Hope this helps.

  • Minal Salunkhe Profile Picture
    65 on at

    Record is active, I have security role which only has read only access but still he is able to edit the record for which I've written javascript.

    javascript fetches the form type.

    Even though on the form it is written readonly on the bottom of the record, it is giving me formtype as update.

  • JokiJani Profile Picture
    25 on at

    Got same problem and its absolutely annoying. I noticed that if I check the FormType in from OnLoad and write it into alert like alert("formtype = " + FormType), it raises the alert and in that point I can see in that there is not yet the "Read only" text in the bottom right corner of the form. When I click OK in Alert and the form continues to run the rest of the scripts, only after that the form changes to "Read only" mode. So it seems that the form is not in "Read only" mode when OnLoad scritpts are run and that's why it returns FormType = 2 althougth it is "Read only"

    Have anybody discovered how to determine that the form is Read only?

  • Community Member Profile Picture
    on at

    Did you figured out the problem for the form type 2 , i am in the same boat. On read i am getting the form type as 2

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans