There is a small simple customization to Add lookup on mobile device portal page.
Lets take an example of adding lookup for PONumber, on PO receiving page.
First we need to understand that, for every action like PO putaway, item movement, PO recieiving there should/might exist a separate extended class exist which is the extension of a base class ‘WHSWorkExecuteDisplay’, so for PO receiving we have the class name ‘’WhsWorkExecuteDisplayPOItemReceiving”, you guys can check it from debugging via Visual studio.
So here are the customization for the lookup.Note that I have followed the same design which already exist for the UOM(Unit of measure lookup) control within the same PO receiving page.
So First I created a new method ‘buildPO‘ in the class ‘’WhsWorkExecuteDisplayPOItemReceiving’ which iterates all the PO(s) and returns the appended element as string.i.e.
Secondly I created another method ‘buildPONum’ which calls the ‘buildPO’ method and also calls the buildControl method and pass the return element value within that method as data.i.e
Finally, in ‘buildPOItemReceiving’ I called the ‘buildPONum’ method below ‘buildUOM’ method i.e.
Lastly , after logging in and showing the page, it will be look like this i.e