Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3280

How to get CardCode from Purchase Order

$
0
0

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


Viewing all articles
Browse latest Browse all 3280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>