Using BHVRCOM with COM
JD Edwards EnterpriseOne clients use the BHVRCOM structure to control the execution of business functions. A COM client can use the IBHVRCOM interface to set and get BHVRCOM values for business functions. The interface definition is in the jdeconnector2.idl file.
This Visual Basic code demonstrates how to query the IBHVRCOM interface and pass values to business functions:
Dim conn As New Connector '//COM Connector DIM WithEvents OW As OneWorldInterface '//OneWorldInterface Dim myBHVRCOM As IOneWorldBHVRCOM '//BHVRCOM Dim AB As JDEAddressBook '// AddressBook Dim phone As D0100032 '//Data source 1 = conn.Login("JDE", "JDE", "M7332RS02") Set OW = conn.CreateBusinessObject("OneWorld.FunctionHelper.1",1) Set myBHVRCOM = OW '// query the IOneWorldBHVRCOM interface MyBHVRCOM.iBobMode = 8 '// set BHVRCOM values MyBHVRCOM.szApplication = "myApp" MyBHVRCOM.szVersion = "myVersion" Set AB = conn.CreateBusinessObject("AddressBook.JDEAddressBook",1) Set phone = AB.CreateGetPhoneParameterset Phone.mnAddressNumber = 1 AB.GetPhone phone, OW, conn, 1 '// business function is executed with the BHVRCOM values
This table explains some of the code:
Code |
Explanation |
---|---|
myBHVRCOM.iBobMode= |
BobMode is the mode (add, update, delete) of the interactive application. Values for BobMode are: BOB_MODE_UNDEFINED = 0 BOB_MODE_SPECIAL = 1 BOB_MODE_ADD = 2 BOB_MODE_ADD_PRIMARY = 3 BOB_MODE_ADD_SPECIAL = 4 BOB_MODE_DELETE = 5 BOB_MODE_UPDATE = 6 BOB_MODE_UPDATE_SPECIAL = 7 BOB_MODE_INQUIRE = 8 BOB_MODE_COPY = 9 |
myBHVRCOM.szApplication= |
The value is the name of the interactive application. |
MyBHVRCOM.szVersion= |
The value is the version of the interactive application. This field can be used for localizations of the applications. |