Common JavaScript Functions

Introduction

 
In dynamics most of the time we need to prepare a demo for clients in a short time. And to achieve this we need to prepare a library of Java Script, which is helpful to design your demo in a short time.
 
Prepare your library according to my previous blog. Please check the below screen.
 
  1. GetDate - Use to get date field value
  2. PartDate - Use for getting the date in parts.
     
    Note - Months start from 0 which means 0 for January, so we need to incremental.
     
     
  3. CurrentDateTime - Get Current Date and Time.
  4. SetCurrentDateTime - Set current date and time.
     
     
  5. AddDaysInDate - Some requirement to add days in date. So AddDaysInDate function will use.
  6. SetTime - Set time in field.
     
  7.  
  8. GetBusplateLookup - Use to fetch the lookup field value and set in some variables.
     
     
  9. SetBusplateLookup - Use for setting the lookup field.
     
     
  10. GetFormType - Below mentioned function is used for getting the form type and also mentioning how to use the switch statement in java script.
     
     
  11. SetApproval - This function is used for setting user approval confirm box.
     
     
  12. HideShowTab - Use for Hiding and Showing the tab.
     
     
  13. TabColor - This function is used for coloring the form tab.
     
    Note - Use the "Use legacy form rendering" in System setting.
     
     
  14. Generate the Auto number for demo.