function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BAI-JonBAI-Jon 

Why can't I assign an account to a case?

I have an scontrol that is building a few cases that relate to a custom object and it fills out all the information.  I now want to associate one of the cases with an account.  I have the account ID already, when i try to assign it to the "Account" field or the "AccountID" field of the case it errors out and tells me they don't exist.

Here is what my line looks like:

consultingCase.set("Account", accountReferenceID);

or

consultingCase.set("AccountID", accountReferenceID);

If i leave this line out, the case will create just fine.  What am i doing wrong?
WhyserWhyser
which version of ajax are you using?
The newer ones only require
 
  consultingCase.AccountId = accountReferenceID;
 
You don't need to run a set function.
BAI-JonBAI-Jon
It is using beta3.3.  I originally created this scontrol about 2 years ago and haven't touched it until recently.  What is the current version?
WhyserWhyser
current version is like 12.0 or 13.0...
 
much has changed since then, and the code is a lot better.
 
 
no more creating dynabeans and a lot better object modelling.
BAI-JonBAI-Jon
I couldn't get 13 to work properly, kept throwing errors, but 12 works great. And it ran through the code much much faster.  Also took care of the account problem using the same syntax i was trying to use, the set function still works.

Thanks Whyser.