You need to sign in to do that
Don't have an account?
sam_Admin
Help with Javascript Button
Hi,
I tried creating this button but iam getting this error "A problem with the OnClick JavaScript for this button or link was encountered:invalid regular expression flag e". What iam doing wrong?
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
var Status = '{!ELA__c.Status__c}';
if(Status == "Active")
{window.location = /a02/e?
retURL=%2F{!ELA__c.Id}
&RecordType=01240000000M83B
&00N40000002Hvox="ELA"
&00N40000003BOiQ={!ELA__c.Name}
&00N40000002HvWZ="IRB"
}
else if(Status = "Inactive")
{window.location = /a02/e?
retURL=%2F{!ELA__c.Id}
&RecordType=01240000000M83B
&00N40000002Hvox="BLA"
&00N40000003BOiQ={!ELA__c.Name}
&00N40000002HvWZ="CRB"
}
I tried creating this button but iam getting this error "A problem with the OnClick JavaScript for this button or link was encountered:invalid regular expression flag e". What iam doing wrong?
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
var Status = '{!ELA__c.Status__c}';
if(Status == "Active")
{window.location = /a02/e?
retURL=%2F{!ELA__c.Id}
&RecordType=01240000000M83B
&00N40000002Hvox="ELA"
&00N40000003BOiQ={!ELA__c.Name}
&00N40000002HvWZ="IRB"
}
else if(Status = "Inactive")
{window.location = /a02/e?
retURL=%2F{!ELA__c.Id}
&RecordType=01240000000M83B
&00N40000002Hvox="BLA"
&00N40000003BOiQ={!ELA__c.Name}
&00N40000002HvWZ="CRB"
}
window.location = 'http://test.com';
A problem with the OnClick JavaScript for this button or link was encountered:
expected expression, got '%'