I am trying to add a parameter to the URL. I am able to do this if I call my page from a button. However, I am calling my page through workflow and it does not appear to be working and I cannot figure out why.
I have the following URL
sagecrm/.../LeaseEmail.asp
It was generated as follows from workflow. The type is a transition rule and the custom file name is CHS/LeaseEmail.asp?type=Lease (type=Lease) being the parameter I am trying to pass.
I put the following script in custom content..
<script>
function Toby()
{
var EmailType = crm.getArg("type");
if(EmailType == "Lease")
{
alert("It's there.");
}
else
{
alert("It's not.")
}
}
crm.ready(function()
{
Toby();
});
</script>
When I hit the workflow item, I get a message...It's not.
I cannot see what I am doing wrong. Any assistance would be greatly appreciated! Thank you!