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)

Not able to update a locked field by plugin

(0) ShareShare
ReportReport
Posted on by 437

Hi 

I am trying to  update a field which is added in form .

It is showing locked symbol.

I am trying to update this field by plugin but it is not working. 

Please suggest.

*This post is locked for comments

I have the same question (0)
  • Thomas David Dayman Profile Picture
    11,323 on at

    Could you show us some of your code?

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Can you please provide code of your plugin and screenshot how you registered your plugin?

  • David Jennaway Profile Picture
    14,065 on at

    What happens when you try an update the field in the plugin code ? Do you get an error ?

    Is this a custom field, or a system field ? Some system fields cannot be updated - these have ValidForUpdate = false in the metadata

  • Leonardo Mizikami Profile Picture
    152 on at

    If the plugin step is registred in post operation, make sure you are updating the entity.

    If it is not the case, any exception was thrown? Can you share the source code?

  • Suggested answer
    Community Member Profile Picture
    on at

    Quick way of doing it is via the PRE operation plugins, PRE-create, PRE-update etc.

    var target = context.TargetImage;

    target[FIELDNAME] = VALUE;

  • windyMill Profile Picture
    437 on at

    I got the answer a javascript at form load was locking the field. I removed it then its working fine.

    Thank you all

  • Suggested answer
    Community Member Profile Picture
    on at

    oh.. although the reply might come too late, but you can use this to update a locked field

    Xrm.Page.getAttribute("xxx").setSubmitMode("always");

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