locked
global variable to access value in all functions RRS feed

  • Question


  • Hi,

    I have retrived user id in one variable in form load funciton by using java script.  But the retreived value is accessible only in that funcion.  Is there any way I can create global variable so I do not have to write a script in all funtions like load form, save form etc. The value in the variable in be availabe in all funcions.  Or any other alternate solution for this

    Regards,

    Noushad

    • Edited by P Noushad Wednesday, November 27, 2013 11:55 AM
    Wednesday, November 27, 2013 10:16 AM

Answers

  • Hi,

    In the java script file on top of your funtions declare a variable and in side your function change/update the variable value. You will be able to get the value for all function.

    • Marked as answer by P Noushad Wednesday, November 27, 2013 12:36 PM
    Wednesday, November 27, 2013 11:54 AM

All replies

  • Could you share some details about your question ??

    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Wednesday, November 27, 2013 10:34 AM
    Moderator
  • Hi,

    I have retrived user id in one variable in form load funciton by using java script.  But the retreived value is accessible only in that funcion.  Is there any way I can create global variable so I do not have to write a script in all funtions like load form, save form etc. The value in the variable in be availabe in all funcions.  Or any other alternate solution for this

    Regards,

    Noushad


    pnoushu@hotmail.com

    Wednesday, November 27, 2013 11:34 AM
  • Hi,

    In the java script file on top of your funtions declare a variable and in side your function change/update the variable value. You will be able to get the value for all function.

    • Marked as answer by P Noushad Wednesday, November 27, 2013 12:36 PM
    Wednesday, November 27, 2013 11:54 AM
  • Hi,

    It is  working. 

    Regards,

    Noushad


    pnoushu@hotmail.com


    • Edited by P Noushad Wednesday, November 27, 2013 12:35 PM
    Wednesday, November 27, 2013 11:58 AM