I recently had the pleasure of meeting the guys from SmartCatalog during a co-presentation we did on CRM 4.0. Their product is great and interfaces very nicely with the MS-CRM platform. Read about our partnership from an independent source here:
http://blog.tmcnet.com/telecom-crm/2008/04/18/crm-platform-from-mozes-endeavor-and-statera-amdocs-results-cegedim-de.asp
Wednesday, April 30, 2008
Thursday, March 20, 2008
Disable all attributes on a form
I found this snippet of code today on a message board to disable all attributes on a form:
for (var i = 0; i <>)
{
crmForm.all[i].Disabled = true;
}
for (var i = 0; i <>)
{
crmForm.all[i].Disabled = true;
}
Original post can be found here:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.crm.developer&tid=0ddb6aa6-3d3c-4299-835e-94a8bc9509c1
Labels:
attribute,
form customization,
javascript,
MS-CRM
Thursday, September 6, 2007
Getting values from a lookup control
We recently needed to capture both the GUID and the text value from a CRM lookup control. I found some quick code to do this on the following newsgroup:
http://groups.google.com/group/microsoft.public.crm/browse_thread/thread/9bc6721768f0a1f1/4b5f5d0ff5972dc0?lnk=st&q=ms+crm+get+lookup+datavalue&rnum=1&hl=en#4b5f5d0ff5972dc0
var lookupItem = new Array;
lookupItem = crmForm.all.primarycontactid.DataValue;
if (lookupItem[0] != null)
{
// The text value of the lookup.
alert(lookupItem[0].name);
// The GUID of the lookup.
alert(lookupItem[0].id);
}
http://groups.google.com/group/microsoft.public.crm/browse_thread/thread/9bc6721768f0a1f1/4b5f5d0ff5972dc0?lnk=st&q=ms+crm+get+lookup+datavalue&rnum=1&hl=en#4b5f5d0ff5972dc0
var lookupItem = new Array;
lookupItem = crmForm.all.primarycontactid.DataValue;
if (lookupItem[0] != null)
{
// The text value of the lookup.
alert(lookupItem[0].name);
// The GUID of the lookup.
alert(lookupItem[0].id);
}
Labels:
attribute,
form customization,
javascript,
MS-CRM
Quickly getting the GUID of the current form
Here is a quick snippet of javascript code to get the GUID of the current CRM form:
crmForm.ObjectId
crmForm.ObjectId
Friday, July 6, 2007
Set Datetime field using Javascript
Here is the code to set the date and time of a datetime field using Javascript. You can put this into your onLoad event handler.
var today = new Date( );
today.setHours(14);
today.setMinutes(00);
crmForm.all.new_datefield.DataValue = today;
var today = new Date( );
today.setHours(14);
today.setMinutes(00);
crmForm.all.new_datefield.DataValue = today;
Tuesday, June 26, 2007
Dynamically Changing an IFrame URL
Here is the code to dynamically change an IFrame URL. Put this code in your onLoad event handler on a form:
var ProcessID = crmForm.all.new_fieldname.DataValue;
IFRAME_report.location='http://www.google.com';
You can also hide an IFrame onLoad and display it when needed by including the following code:
crmForm.all.IFRAME_report.style.display = 'none';
var ProcessID = crmForm.all.new_fieldname.DataValue;
IFRAME_report.location='http://www.google.com';
You can also hide an IFrame onLoad and display it when needed by including the following code:
crmForm.all.IFRAME_report.style.display = 'none';
Wednesday, June 20, 2007
Creating a button to call any Actions Menu function
I found a way to call the "Apply Rule" window and pass all the necessary parameters from a button on the form. This procedure can be used though to call any Actions Menu fuction on a form. Below is example code that creates a button on a custom entity. Place this code in the isv.config.xml file. The key piece of code is the JavaScript parameter value: onActionMenuClick('applyrule', 10023)
The only thing you have to change is the ObjectId (10023 in the sample code below).
The only thing you have to change is the ObjectId (10023 in the sample code below).
<Entity name="new_snapshot">
<ToolBar ValidForCreate="0" ValidForUpdate="1">
<Button Title="Run Process" ToolTip="Run Data Process" Icon="/_imgs/ico_18_4405.gif" Url="" JavaScript="onActionMenuClick('applyrule', 10023)" PassParams="0" WinParams="" AvailableOffline="false" WinMode="1"/>
</ToolBar>
</Entity>
To call any other Actions Menu function, open up the form you want to the button on, view the html source of the form and search for the the Actions Menu fuction (e.g. Deactivate). Copy the JavaScript function into the JavaScript tag on a button.
Subscribe to:
Posts (Atom)