All users that have a record in syslastvalue table with the field elementname value SalesFormLetter_PackingSlipProject and field designname value FormletterService.postSalesOrderPackingS cannot return items and get a warning. If I delete this record in the table fort the specific user they can bring back items without a warning. Also when try to bring the item back as another user without this record will go without warning. Once in a while after deleting the class the record is recreated and the problem reoccurs.
I use a script to see which users has this specific record.
static void ABE_check_settingReturningItems 20171106(Args _args)
{
SysLastValue SysLastValue;
while select SysLastValue where SysLastValue.elementName == 'SalesFormLetter_PackingSlipProject' && SysLastValue.designName == 'FormletterService.postSalesOrderPackingS'
{
info(SysLastValue.userId);
}
}
To see the record;
1. Open AX as the specific user and go to Fileà Toolsà Options.
2. Select the menu Usage Data. Go tot the tab All Usage Data.
3. Filter on field elementname for SalesFormLetter_PackingSlipProject and designname value FormletterService.postSalesOrderPackingS.
For now we leave the record to create the issue.
1. Open AX and open the project module. Find a project that is open with items on it to return.
2. On the specific project and go to Item requirements.
3. Go to menu functionsà return items.
4. Press OK.
The following warning appears;
If we delete the record mentioned in the beginning the warning does not occur.
If we look in the code the warning above is label @SYS24920. This label is used in the class inventMovement. The method checkUpdatePhysical contains calling a function checkNotOverDelivery that returns a boolean. If the user is getting an error the function returns true. If not then the function returns false. The line of code executing is:
if (this.mustCheckOverDeliveryForQty(_updateNow.parmPhysical())
&& !this.checkNotOverDelivery(_updateNow.parmPhysical(), true, _updateNow.parmPdsCWPhysical()))