Getting key value to be added in URL from client side script

By | June 9, 2011

I remember when I train my developers to work on sage CRM customizations they really face hard time to understand creating URL’s on server side, client side as well as passing them to and fro, as in Sage CRM entire screen loading and functionality depends on the keys being passed through URL’s. I remember I had posted a detailed write up on this topic on this blog site before. Below is the link to the same if anybody wants to refer.

http://sagecrmaddons.blogspot.com/2011/01/handling-urls-in-com-api-part-1.html

Well, today I will explain use of GetKeys method. On every page designed with standard built, this function is added by default. This returns the keys being used for the current page we are looking at. The standard function looks something like given below.

Script

function GetKeys()
{
return “&Key0=4&Key4=108”;
}

Through your client side you simply have to call this function and get values in string variable to be appended in URL like given below.

Script

var KeyString = GetKeys();
URL = ‘ First part of url ’ + KeyString

If you find this content useful, please drop us an email at crm@greytrix.com.