reuben
01/25/2024, 4:45 PMINVALID_FLD_VALUE
You have entered an Invalid Field Value 80974 for the following field: item
This item works in the ui for this customer, Here is my code, Thanks
const rec = record.create({
type: record.Type.ESTIMATE,
isDynamic: true
})
rec.setValue({ fieldId: 'entity', value: 1003 })
rec.selectNewLine({ sublistId: 'item' })
rec.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'item',
value: 80974
});
rec.setCurrentSublistValue({
sublistId: "item",
fieldId: "quantity",
value: 1
})
rec.commitLine({ sublistId: "item" })
const saved = rec.save()
I also tried with const rec = record.transform({fromType:'customer', fromId:1003, toType:record.Type.ESTIMATE, isDynamic:true}); and same error
ericbirdsall
01/25/2024, 5:25 PMrecord.create
to set the customer
Not 100% sure, but it may make a difference
const rec = record.create({
type: record.Type.ESTIMATE,
isDynamic: true,
defaultValues: {
entity: 1003
}
})
ericbirdsall
01/25/2024, 5:26 PMericbirdsall
01/25/2024, 5:28 PMreuben
01/25/2024, 5:45 PMClay Roper
01/25/2024, 6:27 PMericbirdsall
01/25/2024, 6:28 PMClay Roper
01/25/2024, 6:33 PMericbirdsall
01/25/2024, 6:33 PMreuben
01/25/2024, 7:17 PMericbirdsall
01/25/2024, 7:19 PMreuben
01/25/2024, 7:20 PMericbirdsall
01/25/2024, 7:22 PMrec.setValue({ fieldId: 'entity', value: customerLookup.subsidiary[0].value})
to set the sub to the customers sub?reuben
01/25/2024, 7:23 PM