Avatar

Correct answer by
Level 4

hello @MartinViking,

 

Your sqlExec is weird, to call a variable in sqlExec you have to write "$(variable type)" : 

https://experienceleague.adobe.com/developer/campaign-api/api/f-sqlExec.html?hl=sqlexec

 

In your case it should be :

 

sqlExec("UPDATE NmsDelivery SET iMaxRetry=$(l) WHERE iDeliveryId=$(l)"...

 

$(l) with the letter "L" not with the number "1"

 

The second thing that does not make sense in you query is that you match the iDeliveryId with record.$maxRetry.

It should be the record.$deliveryId.

 

you hole sqlExec should be : 

 

sqlExec("UPDATE NmsDelivery SET iMaxRetry=$(l) WHERE iDeliveryId=$(l)", setMaxRetry, record.$deliveryId);

 

 

After saying all that your solution is not going to work, because after the validation of the delivery, the maxRetry parameter no longer matters. You have to modify this parameter before the final preparation of the delivery (in a typology rule for exemple )

 

Best regards,

 

Amine

View solution in original post