Melissa
01/25/2024, 10:01 PMfor loop
, like i've done many times for the items sublist, and want to grab the promo code, like this:
promoCode = newRecord.getSublistValue({
sublistId: "promotions",
fieldId: "couponcode_display",
line: i
});
I have be overlooking something obvious here. Any help is appreciatederictgrubaugh
01/25/2024, 10:03 PMcouponcode_display
looks a strange ID to me. Based on the Record Browser for a Sales Order, I'd expect to retrieve the couponcode
field or the promocode
field.erictgrubaugh
01/25/2024, 10:04 PMgetSublistText()
instead of getSublistValue()
Melissa
01/25/2024, 10:10 PMpromocode
and left it as value because I could use about anything here as long is it sets the promocodes apart. Thanks for responding. Let me try promocode
again and with the get text and get val calls . . .Melissa
01/25/2024, 10:21 PMpromoCode = newRecord.getSublistValue({
sublistId: "promotions",
fieldId: "promocode",
line: i
});
It doesn't return anything. And from the records browser, this is what I should be able to get, yes?Melissa
01/25/2024, 10:24 PMvar promoLineCount = newRecord.getLineCount({ sublistId: 'promotions' });
it returns the number of promo lines.
but I cant get any promo sublist value to returnalien4u
01/25/2024, 11:04 PMgetSublistFields()
It will show you all the available fields... then go from there.Melissa
01/25/2024, 11:21 PM