Best Way to Call Common JavaScript From Application Ribbon

Dear Dynamic People,

Many time we receive design requirement like change color of view, form tabs, section, add a section as navigation menu or some specific COMMON javascript throwout application.To achieved this, developer register to each entity.

Instead of a register JS on each entity, use an Application Ribbon to call the common javascript or on-load of view/dashboard call javascript.

For call the JavaScript on-load of view/dashboard/entity form.Following steps is mention.

  1. Download a RibbonWorkbench solution and import into your organization.
  2. Create a solution and add existing Client Extensions.

3. Open ribbon workbench, choose a solution which contains the Application ribbon. Ribbon have major four part.

A. BasicHomeTab

B. SubGridRibbons

C. Form Ribbon

D. Other

Ribbons available in Microsoft Dynamics 365

Task 1 : Call Common JavaScript on view load and color formatting base on status.

Step 1. Add application button on Basic Home section. And place the button as per your requirement. Here we add in              “Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab “.

Step 2. Add commands for this button as javascript.

Step 3:  Add enable rule for this command.

Step 4: Public the solution and check all entity. This JS call on all view and work as define in javascript.

Task 2 : Call Common JavaScript on all entity load and style the tabs of form.

Step 1. Add application button on Form section. And place the button as per your requirement. Here we add in                 ” Mscrm.Form.{!EntityLogicalName}.MainTab “.

Next steps are same as a mention for task 1.

Best to load common validation design on page load, in result application behave quick response and structural.

Thanks !!!

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s