Update sales line Qty manually. This code also update remain qty in SalesLine tabale and qty in InventTrans table.
static void UpdateSalesLineQty(Args _args)
{
SalesLine salesLine;
;
ttsbegin;
salesLine = SalesLine::findInventTransId('14723621_068', true);
salesLine.SalesQty = 3;//example
salesLine.modifiedField(fieldnum(SalesLine, SalesQty));
InventMovement::bufferSetRemainQty(salesLine);
salesLine.update();
ttscommit;
info("Done");
}