Microsoft CRM Houston
(800) 892-6143

Your Full Name:                  Your e-mail                   Comments

Implementation & Customization

Adding buttons to a Dynamics CRM entity via the entity onload event using JavaScript

var toolbar = document.all.mnuBar2.rows(0).cells(0);

var html = "<SPAN tabindex='0' class='menu' style='padding:4px 4px 0px 4px' pl='4' pr='4' title='Button Title' onclick='yourFunction()' id='idhere'><DIV class='mnuBtn'><IMG src='/_imgs/ico_16_rpt_custom.gif' class='mnuBtn'>Button Title</DIV></SPAN>";

toolbar.insertAdjacentHTML("beforeEnd", html);

yourFunction= function()

{

var singuid = crmForm.all.SomeCRMFieldHere.DataValue;

if(singuid !=null){

var guid = singuid[0].id;

var site= "http://yourCustomApplicatoin.com/default.aspx?"+guid ;

window.open(site, "mywindow","menubar=0,resizable=0,width=375,height=250");

 

Training
Microsoft CRM 101
Microsoft CRM for Outlook
Microsoft CRM Advanced Find
Microsoft CRM Reports
Microsoft CRM Database
Microsoft CRM Web Services
Microsoft CRM JavaScript
Microsoft CRM Add-ons
Microsoft CRM Resources
Microsoft CRM Callouts
Microsoft CRM Workflow