on 2021 Mar 12 5:01 PM
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
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Dear jeff.putnam,
After your button is clicked, just use the following:
SAPbouiCOM.EditText oEditDocNum = (SAPbouiCOM.EditText)form.Items.Item("8").Specific;
var value = oEditDocNum.Value;
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.