You need to sign in to do that
Don't have an account?
J_Hinder
AJAX DynaBean underscore problem
So,
When I do this:
var cm = new DynaBean("CampaignMember");
cm.set("CampaignId", "foo");
everything's just peachy, but when I add in an underscore:
var cm = new DynaBean("CampaignMember");
cm.set("Campaign_Parent_Id__c", "foo");
I get this javascript error:
Line:111
Char:3
Error: Exception Thrown and not Caught
Code:0
URL: https://na1.salesforce.com/servlet/servlet.Integration?lid=01N300000000BwA&eid=a0130000001LClI&enc=UTF-8
Weird, eh?
When I do this:
var cm = new DynaBean("CampaignMember");
cm.set("CampaignId", "foo");
everything's just peachy, but when I add in an underscore:
var cm = new DynaBean("CampaignMember");
cm.set("Campaign_Parent_Id__c", "foo");
I get this javascript error:
Line:111
Char:3
Error: Exception Thrown and not Caught
Code:0
URL: https://na1.salesforce.com/servlet/servlet.Integration?lid=01N300000000BwA&eid=a0130000001LClI&enc=UTF-8
Weird, eh?
I thought, 'Hmm....maybe its the fact that I'm using Beta1 and not Beta2', so I changed it to beta2. Still have the same problem, however it's now on line 113 instead of 111.
This leads me to believe that it's not something on my end. Is it?
Wrap the call in a try catch block:
try {
cm.set("Campaign_Parent_Id__c", "foo");
} catch (e) {
alert(e + " - " + e.message);
}
See what the alert puts up.
By the way, I tried this with a custom field on an account object and had no errors.