locked
CRM 4.0 Disable some of the form fields on save RRS feed

  • Question

  • Hi,

    How can we disable some form fields on save? I am using the follwoing onsave event of my entity.

    crmForm.all.new_field1.Disabled= true; ( for picklist)
    crmForm.all.new_field.2.Disabled= true; ( for nvarchar)

    But this doesn't really do anything? Can someone help please.

    Thank you-

     


    • Edited by SP_Go Friday, September 2, 2011 5:09 PM
    Friday, September 2, 2011 5:01 PM

Answers

  • I think you need to write the code in form load

    check the fom type

    if (crmForm.FormType ==2)  and place if your code to disable in update mode

     

     

    • Proposed as answer by Jehanzeb.Javeed Friday, September 2, 2011 9:28 PM
    • Marked as answer by SP_Go Tuesday, September 6, 2011 12:59 AM
    Friday, September 2, 2011 9:27 PM

All replies

  • Sorry - I'm not sure I uderstand what you're trying to do - are you trying to disable the field on the form if the form has been saved? (i.e. the form is in 'update' mode instead of 'create')

     


    Scott Sewell, CustomerEffective | http:\\blog.CustomerEffective.com | Twitter:@ScottSewell
    Friday, September 2, 2011 6:47 PM
    Moderator
  • I think you need to write the code in form load

    check the fom type

    if (crmForm.FormType ==2)  and place if your code to disable in update mode

     

     

    • Proposed as answer by Jehanzeb.Javeed Friday, September 2, 2011 9:28 PM
    • Marked as answer by SP_Go Tuesday, September 6, 2011 12:59 AM
    Friday, September 2, 2011 9:27 PM