on 2005 Aug 03 5:03 PM
I've added a message box to the delivery screen, so that when the user clicks add they get the option of saving the delivery as a draft or as a delivery.
The code to save the delivery in draft mode works fine - I just call the activate menu item. However, if I want the delivery to be saved (in otherwords, I just want the delivery screen to carry on as normal) then SBO seems to cancel the event and not save anything.
Here's the code (from the ItemEvent event):
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ItemUID == "1" && pVal.BeforeAction)
{
if (pVal.FormMode == (int)SAPbouiCOM.BoFormMode.fm_ADD_MODE)
{
if (moSBOApp.MessageBox("Save as draft?", 1, "Yes", "No", "") == 1)
{
// save as draft
moSBOApp.ActivateMenuItem("5907");
BubbleEvent = false;
}
else
{
BubbleEvent = true;
}
}
else
{
BubbleEvent = true;
}
}
use et_ITEM_PRESSED event rather than the click event.
Indika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
109 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.