In D365F&SCM (FO) I have upgraded a list "page" from AX2012 but the list is empty when the app presents the content. Also, the list of sorting fields is empty and does not include the table fields that are configured to be presented in the list elements.
The list contains the expected result (open purchase order lines) in the simulator.
So what am I missing or doing wrong as I want my class rendered as a list?
The scenario (some details are left out for readability):
* A new class MyPOList is created extending from WHSWorkExecuteDisplay.
* The enums WHSWorkExecuteMode and WorkActivity are extended with element MyPOList.
- The class MyPOList is decorated with "[WHSWorkExecuteMode(WHSWorkExecuteMode::MyPOList)]".
* Two new classes are created to tell the MD framework to render the page/controls as a list:
[WHSWorkExecuteMode(WHSWorkExecuteMode::MyPOList)] // This associates my class with a specific page pattern
class WhsMobileAppServiceXMLDecoratorFactoryMyPOList implements WHSIMobileAppServiceXMLDecoratorFactory
{
#WHSRF
public WHSMobileAppServiceXMLDecorator getDecorator(container _con)
{
return new WHSMobileAppServiceXMLDecoratorMyPOList(); // This directs the app to the class which defines the page pattern
}
}
class WHSMobileAppServiceXMLDecoratorMyPOList extends WHSMobileAppServiceXMLDecorator
{
public WHSMobileAppPagePattern requestedPattern()
{
return WHSMobileAppPagePattern::InquiryWithNavigation; // This should tell the app to render the page as a list
}
}
* The menu item is configured with WorkActivity:MyPOList and the menu item is added to a menu.
* The field setup (from the MD menu item setup) is refactored to use PurchTable and PurchLine instead of work and load. So the query used by MyPOList loops over purchase data which I have tested to work just fine in the simulator.
* During testing all code changes are reflected in the simulator but the list in the app remains empty.
* After every code change I execute "SysExtensionCache::clearAllScopes()" from a runnable class to ensure that the MD framework picks up the changes before I test my code.
* Effects in the app of changes to WHSMobileAppPagePattern:
WHSMobileAppPagePattern::Inquiry:
The page is rendered with what looks like one big control. The expected business data is presented:
WHSMobileAppPagePattern::Custom:
The page is rendered as a 'plain' page (a not as a list) with all my controls presented just as in the simulator. The expected business data is presented: