Skip to Content
0
Mar 31, 2014 at 12:14 PM

List Screen is not being skipped in Hybrid app in SUP

19 Views

Dear all,

I have to skip list screen and display detail screen directly when list contains one item.I have made changes in Custom.js file as follows.

//hwc.customConditionalNavigation = function(currentScreenKey, actionName, defaultNextScreen, conditionName, workflowMessage)

//{

function customConditionalNavigation(currentScreenKey,

actionName, defaultNextScreen, conditionName, workflowMessage) {

if ((currentScreenKey === 'Start') && (actionName === 'Get_Price'))

{

if (conditionName === 'ONE_ROW')

{

var values = workflowMessage.getValues();

var m = workflowMessage.serializeToString();

var expenseTracking =

values.getData("Material_Get_Price");

var etList = expenseTracking.getValue();

var count = etList.length;

if (count == 1)

{

var etRow1 = etList[0];

workflowMessage.updateValues(etRow1);

return true;

}

}

}

else if (conditionName === 'MANY_ROWS') {

return false; //ie do the normal navigation which is to go to the listview screen

}

return false;

}

where My MBO name is"Material_Get_Price"

But still it is not working.All the time List is coming.