cancel
Showing results for 
Search instead for 
Did you mean: 

BusinessObjectInfo.ObjectKey return the wrong docEntry

Former Member
0 Kudos

Reference :SBO2007

I using BusinessObjectInfo.ObjectKey the DocEntry for new added sales order document

The Code works fine except for the following situations

1) if sales order is being added is based off sales quote

or

2) if sales order is being added based on duplicate

Here is my code

Private Sub dataAdd(ByRef oBusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles oCDIForm.dataAdd

If oBusinessObjectInfo.BeforeAction = False Then

dim strDocEntry as string

Dim sXmlDoc As New Xml.XmlDocument

if oBusinessObjectInfo.ActionSuccess = True Then

sXmlDoc.LoadXml(oBusinessObjectInfo.ObjectKey)

strDocEntry = sXmlDoc.SelectSingleNode("DocumentParams/DocEntry").InnerText

End If

end if

Any hint , on why the BusinessObjectInfo return the wrong docentry during the adding of document if based on duplicate or off sales quote

Sincerel yours

Riade Asleh

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hi,

i know iam a bit late ... but maybe you read this anytime .......

try once to read the value from the DataSource


if (BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD &&
    BusinessObjectInfo.BeforeAction == false && BusinessObjectInfo.ActionSuccess == true &&
    BusinessObjectInfo.FormTypeEx == "141")
{
  oForm = globals.SBO_Application.Forms.ActiveForm;
  Console.WriteLine(oForm.DataSources.DBDataSources.Item(0).GetValue("DocEntry", 0));
}

its working for me also when i duplicate...

lg David

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks

So you are reading it from the grid

Sincerely yours

Riade Asleh