How to set default billing while creating a lead record

While creating a lead record we need to set address as default shipping.

For updating the default shipping or billing we need to use setCurrentSublistText method.

For example

leadRecord.removeLine({
sublistId: ‘addressbook’,
line: 0,
ignoreRecalc: true
});

// billing section
leadRecord.selectNewLine({
sublistId: ‘addressbook’
});
var label = leadRecord.setCurrentSublistText({
sublistId: ‘addressbook’,
fieldId: ‘label’,
text: “Billing Information”
});

leadRecord.setCurrentSublistText({
sublistId: ‘addressbook’,
fieldId: ‘defaultbilling’,
text: ‘T’
});

Leave a comment

Your email address will not be published. Required fields are marked *