Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What

To call any kind of logic in ERP , you can use an “Ad-hoc” actionThis is the simplest form of interaction with the back-end.

  • The user selects the action and the current Order Line information is sent to the back-end.
  • No dialog is presented to the user


You can add the action to:

  • Planned function
  • Unplanned function
  • Lookup



Adding to a Planned function

Planned functions are Pick, Receive, Put-Away etc.

Which data will be transferred to

...

back-end?

...

The sendRegistrationData attribute will decide this. The attribute is only valid on Order and Order Line Pages.

  • Order: All registrations made on the order will be included in the request sent to the server. This will include order header, order level registrations.

  • OrderLine:  then only the registrations for the selected order line (Order line registration and extra information) will be included in the request sent to the server.
    The order tag will be added to the response but only contain information about the selected order line. This is only valid on a Order Line Page.

How to enable for Planned function

Step 1:  Add the action in Configuration file

Android Image Removed


To add the action, modify the In  Application.cfg file.In the following example, a "PrintXYLabel"   


"UnableToPick" action is added to the existing “Receive “Pick Line” page


Code Block
languagexml
titleExample
<adhocRegistration registrationType="PrintXYLabelUnableToPick"
  id="1232"
  icon="postsuccess"
  title="PrintUnable myto XY LabelPick" sendOrderDatasendRegistrationData="trueOrderLine">   <onSuccessfulPost refreshOnSuccess="true"/> </adhocRegistration>


Insert here:

Image Removed

 

Windows Image Removed

To add the action, modify the app.config file.

In the following example, a “ChangeView” action is added to the existing “Pick Line” pageunder <Actions> for the desired page.


Image Added

Step 2: Test the request 

After restart you can now select the action and inspect the Request it makes.


Code Block
languagexml
titleExample
<adhocRequests>
  <orderLine>
    <add id<request name="1PostAdhocRegistration" requestDocumentNamecreated="PostAdhocRegistration2019-07-30T14:38:18+02:00" typexmlns="ChangeView" label="changeView" defaultLabelText="Change View" icon="symbol
find.bmp" refreshOnSuccess="true" sendOrderData="truehttp://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
  <requestData name="PostAdhocRegistration">
    <selectedItemType>OrderLines</selectedItemType>
    <backendId>PI000003</backendId>
    <lineNumber>30000</lineNumber>
    <RegistrationType>UnableToPick</RegistrationType>
    <Order backendID="PI000003" xmlns="http://schemas.taskletfactory.com/MobileWMS/RegistrationData" />
  </orderLine>requestData>
</adhocRequests>

Insert here:

Image Removed

 

...

request>

Step

...

3: Add code to handle action in

...

NAV

...

  • The call goes into

...

  • codeunit “MOB WMS Adhoc Registr.” 
  • Function “PostAdhocRegistration()

...

  • Modify the code to handle this

...

  • new Registration Type.



Add to a Lookup 

See Add an action to Lookup (No dialog)