I can't understand, the field values ​​don't chang...
# general
s
I can't understand, the field values ​​don't change at all. What's wrong? What do I need to add or remove?
Copy code
//carega registro Term
        var objTerm = record.load({
            type: record.Type.TERM,
            id: 193,
            isDinamyc: 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 = objTerm.getValue({
            fieldId: "duenextmonthifwithindays"
        });
		*/

      	//converte em date
        //var termsData = new Date('20/10/2020');

        //Define valor de duedate com o valor obtido do objeto objTerm
        objFatura.setValue({
            fieldId: "duedate",
            value: new Date(),
            ignoreFieldChange: true
          });
n
you need to call
objFatura.save()
to save your changes
👍 1
d
also typo loading
objTerm
, "`isDinamyc`" -> "`isDynamic`"
👍 2
s
thanks @David B and @Nicholas Penree
hey guys, i made the fixes but it still hasn't changed anything. It also does not return an error. It saves the invoice but doesn't change the value of the fields.