Slig
08/18/2021, 8:08 PMfunction afterSubmit(context) {
//Carrega registro Term
var objTerm = record.load({
type: record.Type.TERM,
id: 193,
isDynamic: true
});
//Carrega registro Fatura
var objFatura = record.load({
type: record.Type.INVOICE,
id: 4952604,
isDynamic: true
});
//ObtΓ©m valor da campo duenextmonthifwithindays que estΓ‘ dentro da fatura Term
var nTerm = objFatura.getValue({
fieldId: "duenextmonthifwithindays"
});
//variavel contendo objeto Date
//var termsData = new Date();
//Define valor de duedate com o valor obtido do objeto objTerm
objFatura.setValue({
fieldId: "duedate",
value: nTerm,
ignoreFieldChange: false
});
var recordId = objFatura.save({
enableSourcing: false,
ignoreMandatoryFields: false
})
return recordId;
}
Line #47 is this:
var recordId = objFatura.save({
enableSourcing: false,
ignoreMandatoryFields: false
})
Sandii
08/18/2021, 8:14 PMN/format
if you want to use setValuebattk
08/18/2021, 8:23 PMbattk
08/18/2021, 8:23 PMSlig
08/19/2021, 1:40 PMbattk
08/19/2021, 1:46 PMSlig
08/19/2021, 2:06 PMSlig
08/19/2021, 2:06 PMbattk
08/19/2021, 2:12 PMSlig
08/19/2021, 2:14 PMbattk
08/19/2021, 2:14 PMbattk
08/19/2021, 2:14 PMbattk
08/19/2021, 2:15 PMbattk
08/19/2021, 2:15 PMSlig
08/19/2021, 2:58 PMbattk
08/19/2021, 3:00 PMbattk
08/19/2021, 3:01 PMbattk
08/19/2021, 3:01 PMbattk
08/19/2021, 3:02 PMbattk
08/19/2021, 3:02 PMbattk
08/19/2021, 3:04 PMbattk
08/19/2021, 3:09 PMSlig
08/19/2021, 3:12 PMbattk
08/19/2021, 3:21 PMbattk
08/19/2021, 3:21 PMbattk
08/19/2021, 3:21 PMSlig
08/25/2021, 8:02 PMSlig
08/25/2021, 8:03 PMbattk
08/25/2021, 8:04 PMbattk
08/25/2021, 8:05 PMbattk
08/25/2021, 8:05 PMbattk
08/25/2021, 8:05 PMbattk
08/25/2021, 8:05 PMbattk
08/25/2021, 8:06 PMbattk
08/25/2021, 8:07 PMSlig
08/26/2021, 1:20 PM