Wednesday, 29 June 2016

SysQueryRangeUtil - Custom query function

In one of old post (Dynamics AX batch job relative day parameter), I've mention regarding using function in query range. There're a set of standard functions available in the SysQueryRangeUtil class. But if you happen to need a custom function (especially with more complex logic), you can develop it in this class and use it just like you'll do with the standard methods.

Example:





You can use this function in query object, under the "Range" node, or anywhere that provides filtering functionality.


Tuesday, 21 June 2016

Replenishment error - Location xxxxxx failed due to the strategy

Just a quick post for non-developer who hit this error and looking for solution.

Path to functionality:

  • Warehouse management > Periodic > Replenishments
  • Warehouse management > Inquiries > History > Work creation history log

The error message "Location xxxxxx failed due to the strategy" in "Work creation history log" is due to the "Total available" is less than "Physical stock".

Examples:
Before replenishment run:
- License plate 90, Physical stock = 106, Total available = 96
- License plate 91, Physical stock = 100, Total available = 100

When the replenishment run, it check whether it can locate a full license plate, if it can’t, then it give the “Location xxxxxx failed due to the strategy.” error.

The way it finds the full license plate is by checking the Total available against the Physical stock (this is a simplified explanation of the logic, it does much more than these two checking).

In this instance, LP 01C02E is not fully available (Physical stock is 106, but Total available is only 96), hence, error.
Then it check next LP, 01C03E, this is fully available (Physical stock is 100, Total available is 100), hence, successfully use it.




The code which checks and produce the error is location at this path: \Classes\WHSLocationDirective\performStrategyLPLocate

Wednesday, 15 June 2016

"The endpoint does not exist or the action is not allowed" on Payment journal voucher send

Just a quick post for non-developer who hit this error and looking for solution.

If you're setting up AIF Outbound port for Payment journal, you'll need to add the "LedgerVendorPaymentService.find" operation to the port.

Without this port, when you click on the "Send..." button on the Payment journal voucher, you'll first get the error "No endPoints are configured for the action".


But the "Send document..." dialog will still shows up, and if you continue to select the Port name and click "OK", you'll get the error "The endpoint does not exist or the action is not allowed".



To fix this issue:

  1. Go to: System administration > Setup > Services and Application Integration Framework > Outbound ports
  2. Select the respective port name and click “Deactivate”
  3. Click on “Service operations” button under the “Service contract customizations” FastTab
  4. Double click on the “LedgerVendorPaymentService.find” service operation under the “Remaining service operations” list to add it into the “Selected service operations”
  5. Close the form
  6. Click “Activate” button to activate the Outbound port again