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)

Field is not getting unlocked if I remove Auto number functionality from attribute

(0) ShareShare
ReportReport
Posted on by

Hi,

In D365 MSCRM(9.0 online) , I set auto number formatting on single line of attribute using XRM toolbox. 

Later on, we decided to remove auto number field from that field. So from XRM tool box, I removed that formatting and observed, Auto numbering got stopped but that field is still locked.

After that, I checked customization.xml and found input mask for that field which was showing ReadOnlyOnUI.

Below is correct display mask for this field

<DisplayMask>ReadOnlyInUI|ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>

I removed ReadOnlyInUI from that display mask and imported that solution again. But behavior is still same. I cannot edit that field as it is still locked.

 

Any idea on how to make this field editable after removing auto number on any attribute.

 

Thanks in Advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi Chirag,

    What is the situation of this field on the form? ( the form editor)

    Just an FYI - for dynamics 365 - the auto number functionality has been introduced by microsoft :  rawishblog.wordpress.com/.../how-to-create-auto-number-fields

  • Community Member Profile Picture
    on at

    Hi Rawish,

    I am able to configure Auto number through CreateAttributeRequest and also able to modify auto number properties through UpdateAttributeRequest.

    My problem is I configured auto number on on of my single line of text and marked it as mandatory. After few months it has been decided to have a manual entry instead of auto generated number.

    Now I am able to remove auto number format (i.e. this field stays blank after saving record) but this field is always locked and doesn't allow to enter manual value in it.

    // Retrieve attribute response

               RetrieveAttributeResponse attributeResponse = (RetrieveAttributeResponse)service.Execute(attributeRequest);

               //Modify the retrieved auto-number attribute

               AttributeMetadata retrievedAttributeMetadata = attributeResponse.AttributeMetadata;

               retrievedAttributeMetadata.AutoNumberFormat = null; //Modify the existing attribute by writing the format as per your requirement

               // Update the auto-number attribute            

               UpdateAttributeRequest updateRequest = new UpdateAttributeRequest

               {

                   Attribute = retrievedAttributeMetadata,

                   EntityName = entityName,

               };

               // Execute the request

               service.Execute(updateRequest);

    Above code removes auto number format but doesn't unlock attribute on form :(

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Okay understood.

    how it looks on the form editor? open the field properties from form editor and make sure the option " make field read only" is not checked.

  • Rawish Kumar Profile Picture
    13,758 on at

    4745.1.PNG

  • Suggested answer
    unizap Profile Picture
    on at

    Hi Chirag,

    It is strange that field still remains locked after removing auto number formatting. Also, there is not much documentation around how the field gets locked when auto number is on. I assume that system manages it internally with some on load script. Probably, this will get fixed in future product updates.

    Meanwhile, you may configure a simple business rule which unlocks the field. This rule will execute after internal script and hence will undo the lock action.

  • Community Member Profile Picture
    on at

    Hi Mayank,

    I tried this option too but no luck :(

  • Dhanabal Profile Picture
    232 on at

    Hi chirag,

    Users mistakenly updated manual data in auto numbering field in campaign entity.

    we need to override those records with auto number value.

    could you help me to work around?

  • Suggested answer
    Sreevalli Profile Picture
    3,264 on at

    Hi Chirag,

    Did you try remove, publish and then adding again to the form? Also what is the fields behaviour on other forms?

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans