2017-12-22 5 views
0

私はTwinfield用のアプリケーションを作成しています。私はそれに4つの管理を持つアカウントにログインします。私は支払われない請求書に属するすべての情報を検索したいと思います。ブラウズオプションの使用

検索オプションを使用すると、ある特定のオフィスの請求書が公開されます。

string[][] finderOptions = new string[2][]; 

switch (office) 
{ 
    case 0: 
     finderOptions[0] = new string[] { "office", "xxxx01-01" }; 
     break; 
    case 1: 
     finderOptions[0] = new string[] { "office", "xxxx03-01" }; 
     break; 
} 
finderOptions[1] = new string[] { "dim1", "1300" }; 
TwinfieldFinder.MessageOfErrorCodes[] errorCodes = xmlFinder.Search(hdrXml, "IVT", "*", 0, 1, 0, finderOptions, out findResult); 

これは機能します。しかしそれはinvoicenumberをretunsし、私はまたトランザクション番号が必要です。そのため、私はBrowseを実行してtraansaction番号を見つけます。

多分、invoicenumber isoを使用してトランザクション番号を使用して完全なトランザクションを見つける別の方法がありますか?

ブラウズ呼び出しは次のようになります。

TwinfieldProcessXml.ProcessXmlSoapClient xmlClient = new 
TwinfieldProcessXml.ProcessXmlSoapClient("ProcessXmlSoap", cluster + "/webservices/processxml.asmx?wsdl");            
TwinfieldProcessXml.Header hdrXml2 = new TwinfieldProcessXml.Header(); 
       hdrXml2.CompanyCode = finderOptions[0][1]; 
       hdrXml2.AnyAttr = hdr.AnyAttr; 
       hdrXml2.SessionID = hdr.SessionID; 

IユーザCompanyCodeがヘッダにそれが最初のオフィスに所属informatieを返すalwasy場合、それは問題でdoens't:xxxx01-01。

答えて

0

Twinfieldでブラウズコードを使用している場合が記載されているように、右の会社を選択するために、SoapCallを行うことを確認してください。

https://c3.twinfield.com/webservices/documentation/#/FAQ

は、そうでない場合は、デフォルトの会社のために戻ってデータを取得します。

Q. When using the Browse Data functionality, in the response I get data from a different company. What is wrong? 
A. In the browse data request there is no option to set the current company. Before sending the request, make sure the correct company is set by using the SelectCompany function. See also Web Services Authentication. 

オープンインボイスを取得するには、ブラウズコードを使用するのが最善の方法です。コード100を選択し、列の一致状態にフィルタを追加します。例は次のとおりです。

https://gist.github.com/alexjeen/d4ef3295820dc98c7f0171e47294dbfe

関連する問題