I'm trying to load a custom record like below:
var mergeRecord = record.load({
type: record.Type.'custrecord_merge_vendor',
id: '12',
isDynamic: true
});
This seems wrong.. but the equivalent for standard records is like below:
var objRecord = record.load({
type: record.Type.SALES_ORDER,
id: 157,
isDynamic: true,
});
How to do this ?
Like this:
var mergeRecord = record.load({
type: 'custrecord_merge_vendor',
id: '12',
isDynamic: true
});
You have the right idea, except that you are not passing the correct record type for your Custom Record into the type
property. The correct value will just be the string that is your Custom Record's internal ID; it will start with customrecord_
. You will not use the record.Type
enumeration as that is only for native record types.
Because something like record.Type.'custrecord_merge_vendor'
is not even valid syntax, I highly suggest you familiarize yourself with the fundamentals of the JavaScript language. You can find tons of introductory information and examples over at MDN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With