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