nathanw
03/28/2024, 4:40 PMvar locationField = record.getField({ fieldId: "location" });
log.debug("locationField", {
locationField: locationField,
});
// Logs:
// {"id":"location","label":"","type":"text","isMandatory":false,"isDisabled":false,"isPopup":false,"isDisplay":false,"isVisible":false,"isReadOnly":false}}
How can I get the value of Location in a Client Script?erictgrubaugh
03/28/2024, 4:47 PMrecord.getValue()
, not record.getField()
nathanw
03/28/2024, 4:53 PMrecord.getValue({ fieldId: "location" });
and it returns nothing.erictgrubaugh
03/28/2024, 4:53 PMgetField()
?nathanw
03/28/2024, 4:54 PMgetField
because I don't understand why getValue
does not return anything?nathanw
03/28/2024, 4:55 PMgetValue
returns nothing, I was trying to diagnose whyerictgrubaugh
03/28/2024, 4:57 PMerictgrubaugh
03/28/2024, 4:58 PMlog.debug()
statements showing up at all? I usually find it easier to use console.log
in client scriptsnathanw
03/28/2024, 4:59 PMlog.debug
shows up but prints {}
let me get you the rest of the scripterictgrubaugh
03/28/2024, 5:05 PMprintPackingSlip
invoked? Are your other getValue
calls working (e.g. subsidiary
)?nathanw
03/28/2024, 5:17 PMsubsidiary
works, printPackingSlip
is invoked on a Sales Order Record Button Press, or rather a UserEvent
script puts a button on the Sales Order during beforeLoad
erictgrubaugh
03/28/2024, 5:18 PMnathanw
03/28/2024, 5:18 PMerictgrubaugh
03/28/2024, 5:18 PMCurrentRecord
instance in VIEW mode.erictgrubaugh
03/28/2024, 5:19 PMemail
field coming back empty despite the fact there is clearly a value therenathanw
03/28/2024, 5:20 PMerictgrubaugh
03/28/2024, 5:20 PMsubsidiary
, that does return the valueerictgrubaugh
03/28/2024, 5:20 PMload
the record or do a lookupFields
to get all the values you're interested innathanw
03/28/2024, 5:21 PMnathanw
03/28/2024, 5:21 PM