Determine Popup Indicator Display in Combo Select
AnsweredHi,
We want to enforce a business rule that ensures certain customers receive an Invoice with Goods instead of Delivery documents.
We are trying to intercept the Copy To-->Delivery event on the Sales Order form to prevent users from creating a delivery from the Sales Order if the customer requires an invoice with goods.
Is it possible to determine which entry has been selected in the current trigger system?
The Copy To-->Delivery (Item $[$10000329.0.0]) triggers a Combobox Select event but I am not sure if the popup indicator value is available in the B1UP trigger or condition to determine which entry has been selected.
I have tried using the row, column and menuid fields in case they are used to store the popup indicator value but do not believe they currently do.
If this is not currently possible could we raise this as a feature enhancement to pass the popup indicator value through in the row value for the purpose of triggering?
Below is the c# code I am using in a UI/DI customisation that currently handles this behaviour
If I use the Dynamic Code UF, is there a way to reference the Item Event object that triggered the UF?
if (itemEvent.EventType == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
&& itemEvent.ItemUID == "10000329"
&& itemEvent.BeforeAction == true
&& ((itemEvent.FormType == (int)SboFormTypes.sapSalesOrder && itemEvent.PopUpIndicator == 0)
|| (itemEvent.FormType == (int)SboFormTypes.sapSalesQuotation && itemEvent.PopUpIndicator == 1))
)
{
BubbleEvent = false;
ApplicationContext.Addon.SboApplication.StatusBar.SetText("Business Partner Requires Invoice with Goods", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
}
I have also tried capturing the click event on the popup selection area Form -9876 but this event does not seem to trigger as an item event.
Cheers,
Sean
-
Official comment
Hello Sean,
Great! This will help more B1UP users that search in the Community =)
-
Hi,
I have found the information on eventData and are currently using the following Dynamic code to achieve this. It would be nice if the PopUpIndicator value was passed back in the row field to allow this event to be handled without the use of Dynamic Code :)
ItemEvent itemEvent = (ItemEvent)eventData.ExtendedEventInformation;
if (
(itemEvent.FormTypeEx == "139" && itemEvent.PopUpIndicator == 0)
|| (itemEvent.FormTypeEx == "149" && itemEvent.PopUpIndicator == 1)
)
{
eventData.BubbleEvent = false;
application.MessageBox("Business Partner Requires Invoice with Goods" + Environment.NewLine + "Please copy directly to Invoice");
}
Please sign in to leave a comment.
Comments
2 comments