I've added a button to the standard Sales Order form and get notified when it's clicked. How do I determine the sales order number (DocNum) from the click event?
private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
{
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK)
{ // A mouse click happened. See if it was one of our buttons
if (pVal.ItemUID == "IS_CfgBtn") { // My button was clicked
// Here I need to get the document or DocNum so I can retrieve the document