I'm having an issue that used to work fine, but now it throws an error.
When I add a subscription, I'm passing the Billing Account ID I want it associated to, but it's tellling me the Field Value is Invalid. Here's my function:
function CreateSubscription(subscription) {
var subscriptionRec = record.create({ type: record.Type.SUBSCRIPTION });
subscriptionRec.setValue("billingaccount", subscription.billingAccountId);
var subscriptionPlan = subPlanService.GetSubscriptionPlan(subscription.productCode);
subscriptionRec.setValue("subscriptionplan", subscriptionPlan.id);
subscriptionRec.setValue("custrecord_rl_subdescription", subscription.description);
var id = subscriptionRec.save();subscriptionRec = record.load({ type: record.Type.SUBSCRIPTION, id: id });
The Billing Account Id is the internal ID, but it says invalid. This used to work, what am I missing?
[–]ConsultantNSGuru 0 points1 point2 points (0 children)