Sunday, August 03, 2008

Auto Populate Follow Up "Phone Call" CRM


Ok,


This tip is for free, :)

How many times you think, "finish phone call and need to make a follow up and want to populate with data", well computer dont think for us, but we can create some rules.
This rules can be done with litle code, just use this litle javascript "On_load" event "Phone call Form" to create a fast follow up.
This litle code, help me a lot with Lazy customers :)
Hope you like this article.


I use Portuguese CRM, please change some Var to use with English
Code:
//Follow Up
try
{
document.getElementById("ContextSelect").onblur = ChangeSeguimento;

document.getElementById("_MBdocumentallRelatedInformationPaneExpanddocumentallRelatedInformationPaneLoadContextDatafollowup").onclick=OpenFollowUp;
}
catch(e)
{}
function OpenFollowUp()
{
document.all.RelatedInformationPane.Expand();
document.all.RelatedInformationPane.LoadContextData('followup');
document.getElementById("ContextSelect").focus();
}


function ChangeSeguimento()
{
if(document.getElementById("ContextSelect").DataValue == "followup")
{
//English use "Activity Type"
//Portuguese use "Tipo de Actividade"
if(document.getElementById("activitytype").innerText == "Activity Type")
document.getElementById("activitytype").id = "activitytype1";
document.getElementById("activitytype").onblur= PreencheType;


}
}

function PreencheType()
{
try
{
if(document.getElementById("activitytype").DataValue == "4210")
{
var lookupItem = new Array;
lookupItem = document.getElementById("from").DataValue;


var lookupItemTo = new Array;
lookupItemTo = document.getElementById("to").DataValue;

document.getElementById("from").id = "from1";
var lookItmGrp = new Array();
lookItmGrp[0] = new LookupControlItem(lookupItem[0].id , lookupItem[0].type,lookupItem[0].name );
document.getElementById("from").DataValue = lookItmGrp;
document.getElementById("from1").id = "from";

document.getElementById("to").id = "to1";
var lookItmGrp1 = new Array();
lookItmGrp1[0] = new LookupControlItem(lookupItemTo[0].id , lookupItemTo[0].type,lookupItemTo[0].name );
document.getElementById("to").DataValue = lookItmGrp1;
document.getElementById("to1").id = "to";
//document.getElementById("activitytype1").id = "activitytype";
}
}
catch(e)
{}
}
Post a Comment