Skip to Content
avatar image
Former Member

how to run update operation from MBO

I need to update the data from MBO update operation.

but can you guide me for input how to set the personalised key.

Regard

Ali

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 15, 2014 at 08:23 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 15, 2014 at 08:40 AM

    If it is a native app you don't need to map the input of operation with PKs. You can pass the input of the operation from the method itself. Ex. POListMBO.updateOperation("1001"); Where 1001 is the input.

    Midhun VP

    Add comment
    10|10000 characters needed characters exceeded

    • You have to set the PKs from program. Follow the below steps:

      • Create a new key on the screen where custom menu item is created. Click on screen > Keys>Add. Ex. key name "CustomKey".
      • From the properties of the menu item created, map the PK with the key created (ie.CustomKey ).
      • Write the below code inside custombeforesubmit method inside custom,js file

      hwc.customBeforeSubmit = function(screenKey, actionName, dataMessageToSend) {

      if(screenKey =="Details_Screen" && actionName=="menuItemCallbackTimeSheetMBOCallUpdateQuery " ){

      var myNewValue1 = new MessageValue();

      myNewValue1.setKey("CustomKey");

      myNewValue1.setValue(""+value);//Value you got from screen

      myNewValue1.setType("TEXT");

      var mvc = dataMessageToSend.getValues();

      if( mvc ) {

      mvc.add( myNewValue1.getKey(), myNewValue1 );

      }

      }

      Midhun VP