on 09-11-2015 5:14 PM
Hello Forum,
I have developed an Addin that has to retrieve the CardCode from a Purchase Order. My code worke under B1 9.1, but not with B1 9.0. I have debugged with Visual Studio 2013 the code, but CardCode is empty, no exception is thrown, no LastErrors. Does someone know what could be the problem? I know this is Coresuite code, but the code is in most cases similar to the normal SDK code. The DocNum exits, I have added it to the DB.
public static void GetCardCodeFromPurchaseOrder(int DocNum) {
SwissAddonFramework.B1Connector oB1Connector = SwissAddonFramework.B1Connector.GetB1Connector();
SAPbobsCOM.Documents Order = oB1Connector.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders) as SAPbobsCOM.Documents;
bool Retval = Order.GetByKey(DocNum); // But the object doesnt seemed to be filled!
string CardCode = Order.CardCode;
GetLastSAPError(); // No errors!
Thanks in advance
Mark
Hi Mark,
what value has Retval ?
Apart from that : Normally GetByKey needs the DocEntry not the DocNum.
Sometimes they are equal, but not always.
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Verifiy the version of your sap sdk. Follow this explanation:
DI API version should be equal to the company version or smaller than that. (For example: If the company version is 8.8 than the DI API version can be 2007 or 8.8) Maximum = the company version
In detail (if the referenced version of DI API is installed on the client PC):
An Add-On application using DI API 2007 can connect to any company database of version 2007 or 8.8
An Add-On application using DI API 8.8 can connect to any company database of version 8.8, but not of version 2007
Regards,
Diego
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.