Error calling POST REST web service

I trying to make a new expense note with a REST web service. I sent the petition to the URL:

myurl:8124/.../EXPENSES

With this body:

{
"CLB": "ADMIN",
"DATEXS": "2018-11-28",
"NBREXS": 3,
"CODEXP": "GENERAL",
"FCY": "ES11",
"CPY": "ES10",
"CUR": "EUR",
"ACCNUM": 3,
"VCRTYP": "",
"VCRNUM": "",
"CURTRS": "EUR",
"CURLED2": "EUR"
}

And the web services return this error:

"$severity": "error",
"$message": "X3 engine error: RATEXPENS(0) : Índice erróneo",
"$stackTrace": "X3 engine error: RATEXPENS(0) : Índice erróneo\[email protected]/EXPENENT_RSTD$adx(211) : \[email protected]/EXPENENT_RSTD$adx(128):EXPENENT_RSTD.FCY_PROPAGATE\[email protected]/EXPENENT_RSTD$adx(123):EXPENENT_RSTD.FCY\[email protected]/EXPENENT_RSTD$adx(35):PROPERTIES\[email protected]/ASYRSUB$adx(395):ASYRSUB.MET_PRO_ACTION\[email protected]/ASYRSUB$adx(361):ACTION\[email protected]/WMC1EXPENSES$adx(419):PROPAGATE_FCY\[email protected]/WMC1EXPENSES$adx(363):SET_FCY\[email protected]/C_EXPENSES$adx(108):FCY.SET\[email protected]/ASYRDELCLI$adx(520):ASYRDELCLI.UPD_DELTA\[email protected]/ASYRDELCLI$adx(86):ASYRDELCLI.SET_REPRESENTATION\[email protected]/ASYRMOB$adx(214):ASYRMOB.UPD\[email protected]/ASYRMOB$adx(19):ASYRMOB.HANDLER_POST\[email protected]/ASYRMAIN$adx(566):ASYRMAIN.MANAGE_REQUEST\[email protected]/ASYRMAIN$adx(159):(No Label)\n"
}

What does it mean?

Thank you

  • 0

    After a read, it is trying to set attributes for rate expenses, but it looks like the RATEXPENS(0) array is empty. It is looping through the accounting core model looking for the condition where the ledger currency doesn't equal the expense currency. If it finds this condition it appears to try to set the RATDIV2 and RATMLT2 properties to read only, but it can't reference the rate expense for some reason. 

    ASTATUS = fmet this.RATEXPENS(this.LNKRATLED(J).LIGLED).ASETATTRIBUTE('RATDIV2','$isReadOnly','false')