Tuesday, August 10, 2010

TAB ON CLICK Called Twice

Use


addEvent(crmForm.all.tab7Tab, "mousedown", iframeHOMEPAGEExplorer);

Monday, June 7, 2010

Adding Many to many Data

//Links (relates) an account record to a lead record in a manyToMany relationship
Moniker moniker1 = new Moniker();
moniker1.Name = "opportunity";
moniker1.Id = new Guid("0D50E716-2757-DF11-AF09-000C29A10E7B");
Moniker moniker2 = new Moniker();

moniker2.Name = "contact";
moniker2.Id = new Guid("0D6BF93F-9D94-4EC1-970B-5E1B1BFBADA2");
AssociateEntitiesRequest request = new AssociateEntitiesRequest();
request.Moniker1 = moniker1;
request.Moniker2 = moniker2;
request.RelationshipName = "ppp_opportunity_contact";
service.Execute(request);

Source : http://blogs.msdn.com/b/crm/archive/2008/02/14/crm-4-0-relationships-explained.aspx

Sunday, June 6, 2010

Call a function when a CTRL + key is pressed

Trigger a function when a key is pressed.

function filterKeys()
{
if (window.event)
{
// captures the key combination of Ctrl and Shift keys
if(window.event.ctrlKey && window.event.shiftKey)
{
var key = window.event.keyCode;
// captures the key for upper and lower case F
if (key == 70 || key == 102)
//window.event.keyCode = 0; - do nothing
write a custom function here

}
}
}

Thursday, April 22, 2010

Refresh the GRID in an IFRAME

var iframeWin = crmForm.all.IFRAME_signalcodesummary.contentWindow;
iframeWin.document.all.crmGrid.Refresh();

Friday, April 16, 2010

Change mouse cursor

To change the mouse cursor you can use the below code

document.body.style.cursor='wait'

the following options can also be used

auto -- the default
crosshair - cross
pointer -- the hand similar to the one that appears over a link
help -- question mark
move -- the hand that signifies a movable element
text - cursor
wait -- hourglass

Thursday, April 15, 2010

Check if a record is active

Use the following method to check if a record is active / inactive