locked
Problem with the revised quotes RRS feed

  • Question

  • Hi all,

     

    i've 2 overlapped problems in the quote entity:

    1 - i was trying to revise activated quotes but the following error occurs:

    The object cannot be updated because it is read only

    i've found a solution so that the 'ForceSubmit' make something wrong with activating quotes but the problem is that i really need to use itto submit disabled fields

     

    2 - when trying to revise the activated quotes the following error ocurred in the newly opened form:

     

    There was an error with this field's customized event.

    Field:window

    Event:onload

    Error:

     

    but this error appears when it try to display any popup message in the form onLoad event

     

    any help with these problems will be appreciated especially the second one

     

    thanks and best regards :)

     


    Monday, January 24, 2011 3:39 PM

Answers

  • Hi Mostafa,

    I also suggest you enable CRM Tracing (Start > Run > regedit.exe > [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] > and add here TraceEnabled and TraceRefresh - both dword values, with value 1). Try rerunning your code and tell me what's the error in the trace logs. Also, when writing custom javascript code for CRM, use the try { } catch(err) { } statement, to return the error in a friendlier manner.


    Cornel Croitoriu - Senior Software Developer - http://bizforward.blogspot.com
    Wednesday, January 26, 2011 8:51 PM

All replies

  • Hi all,

     

    i've 2 overlapped problems in the quote entity:

    1 - i was trying to revise activated quotes but the following error occurs:

    The object cannot be updated because it is read only

    i've found a solution so that the 'ForceSubmit' make something wrong with activating quotes but the problem is that i really need to use itto submit disabled fields

     

    2 - when trying to revise the activated quotes the following error ocurred in the newly opened form:

     

     

    There was an error with this field's customized event.

    Field:window

    Event:onload

    Error:

     

    but this error appears when it try to display any popup message in the form onLoad event

     

    any help with these problems will be appreciated especially the second one

     

    thanks and best regards :)

    Monday, January 24, 2011 3:41 PM
  • Just for the first point, you could write a plugin in pre Event that reads if data must be updated, change the state of the current quote, update data, change back the state of quote to its original one.

    Not really sure about the side effects but that should work.


    My blog : http://mscrmtools.blogspot.com

    All my tools on my new dedicated site: MSCRMTools Repository
    Monday, January 24, 2011 4:23 PM
    Moderator
  • and what about the second problem ??
    Monday, January 24, 2011 4:31 PM
  • The second problem sounds like a programming or syntax error in your OnLoad script. What debugging steps have you taken so far?

    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Monday, January 24, 2011 10:17 PM
    Moderator
  • Dear Neil,

     

    idon't thinsk it's a programming or syntax error cause the error occurs only when i try to revise the quote otherwise it works correctly.

    BTW in my onLoad script there exist a piece of code that retrive data from the crm db

     

    when i remove it it works perfectly

     

    thanks in advance for your efforts

    Wednesday, January 26, 2011 11:57 AM
  • Hi Mostafa,

     

    For the second issue, check your custom code for that entity (OnLoad and OnSave events) and try to repair it. For the first issue, you can make a certain field enabled in runtime, even if the form is disabled and force submit it after in the OnSave event.


    Cornel Croitoriu - Senior Software Developer - http://bizforward.blogspot.com
    Wednesday, January 26, 2011 8:16 PM
  • my code works perfectly it only crashes when i try to revise quotes, the error appears in the newly generated quote

     

    for the first issue the ForceSubmit is already found in the onSave event but it also causing the error

    Wednesday, January 26, 2011 8:20 PM
  • Hi Mostafa,

    I also suggest you enable CRM Tracing (Start > Run > regedit.exe > [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] > and add here TraceEnabled and TraceRefresh - both dword values, with value 1). Try rerunning your code and tell me what's the error in the trace logs. Also, when writing custom javascript code for CRM, use the try { } catch(err) { } statement, to return the error in a friendlier manner.


    Cornel Croitoriu - Senior Software Developer - http://bizforward.blogspot.com
    Wednesday, January 26, 2011 8:51 PM
  • Dear Cornel,

     

    i've tried to use try {} catch( err ) { alert(err); } statement and it returns [object Error] message

     

    which is not helpful as you can see

     

    any suggestions ??

    Monday, February 21, 2011 9:36 AM
  • Any exception caught in trace log or event viewer?
    Cornel Croitoriu - Senior Software Developer & Entrepreneur

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    CWS SoftwareBiz-Forward.comCroitoriu.NET

    Monday, February 21, 2011 9:51 AM