通过AIF创build发票审批日记帐

是否可以在Dynamics AX 2012 R2中使用AIF服务(无需自定义代码)来创build发票审批日记帐,该日记帐自动查找具有相同凭证编号的发票注册日记帐,其行为与我们使用Find Voucherfunction时的行为一样通过UI?

如果是这样的话,请你指点我一些关于这个的文档,或者根据下面的附加信息提醒我可能会出错的地方?

详细资料

我们希望将AX与发票扫描/处理解决scheme集成在一起,所有input,编码和发票审批都在第三方系统中完成,发票通过发票注册(在创build时)进入AX,然后作为发票审批日志(一次编码和批准)。

通过创buildtypesInvoice Register的日记帐名称并使用PurchaseInvoiceService的创build操作,我已成功创build发票注册。

我现在正在努力实现Invoice Approval Journal集成; 获取错误通过GeneralLedgerJournalService的创build操作发送消息时, Unable to determine vouchertypes为“ Invoice Approval Journal日记帐”的日记帐名称和与相关“ Invoice Register消息相同的Voucher号码。

我也尝试通过PurchaseInvoiceService发送Invoice Approval Journal ,但收到一个错误,它似乎已validation了我的分类帐帐户和维度(对于帐户types为ledger的LedgerTrans行),就好像它是供应商一样; 即给出错误: Vendor 604123-ABC--DEF---- does not exist

Dynamics社区论坛上的相关讨论主题: https : //community.dynamics.com/ax/f/33/t/243277

Xml创build发票注册

 <?xml version="1.0" encoding="utf-8"?> <axMsg:Envelope xmlns:axMsg="http://schemas.microsoft.com/dynamics/2011/01/documents/Message" xmlns:axTypes="http://schemas.microsoft.com/dynamics/2008/01/sharedtypes" xmlns:axLGJ="http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <axMsg:Header> <axMsg:MessageId>0c2e3227-db84-43b6-9ea7-155d32fee868</axMsg:MessageId> <axMsg:Company>DAT</axMsg:Company> <axMsg:Action>http://schemas.microsoft.com/dynamics/2008/01/services/PurchaseInvoiceService/create</axMsg:Action> </axMsg:Header> <axMsg:Body> <axMsg:MessageParts> <axLGJ:PurchaseInvoice> <axLGJ:LedgerJournalTable class="entity"> <axLGJ:DocumentNum>TestDocNum</axLGJ:DocumentNum> <axLGJ:JournalName>IRJournalName</axLGJ:JournalName> <axLGJ:LedgerJournalTrans class="entity"> <axLGJ:AccountType>Vend</axLGJ:AccountType> <axLGJ:AmountCurCredit>1000</axLGJ:AmountCurCredit> <axLGJ:AmountCurDebit>0</axLGJ:AmountCurDebit> <axLGJ:CashDiscCode /> <axLGJ:Company>DAT</axLGJ:Company> <axLGJ:CurrencyCode>USD</axLGJ:CurrencyCode> <axLGJ:DateCashDisc>1900-01-01</axLGJ:DateCashDisc> <axLGJ:DocumentDate>2017-07-10</axLGJ:DocumentDate> <axLGJ:DocumentNum>TestDocNum</axLGJ:DocumentNum> <axLGJ:Due>2017-08-10</axLGJ:Due> <axLGJ:ExchRate>100</axLGJ:ExchRate> <axLGJ:Invoice>TestDocNum</axLGJ:Invoice> <axLGJ:LedgerDimension> <axTypes:DisplayValue>VendNo123</axTypes:DisplayValue> <axTypes:Account>VendNo123</axTypes:Account> </axLGJ:LedgerDimension> <axLGJ:Payment>30Days</axLGJ:Payment> <axLGJ:PaymId>TestDocNum</axLGJ:PaymId> <axLGJ:TransDate>2017-07-10</axLGJ:TransDate> <axLGJ:Txt>VendNo123 Full Name</axLGJ:Txt> <axLGJ:Voucher>DAT-123456</axLGJ:Voucher> </axLGJ:LedgerJournalTrans> </axLGJ:LedgerJournalTable> </axLGJ:PurchaseInvoice> </axMsg:MessageParts> </axMsg:Body> </axMsg:Envelope> 

Xml创build发票审批日记

即对应于上述发票登记册。 这涉及到我对GeneralLedgerJournalService尝试,除了动作,模式和MessagePart的直接子元素名外,其他都是相同的。

 <?xml version="1.0" encoding="utf-8"?> <axMsg:Envelope xmlns:axMsg="http://schemas.microsoft.com/dynamics/2011/01/documents/Message" xmlns:axTypes="http://schemas.microsoft.com/dynamics/2008/01/sharedtypes" xmlns:axLGJ="http://schemas.microsoft.com/dynamics/2008/01/documents/LedgerGeneralJournal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <axMsg:Header> <axMsg:MessageId>0c2e3227-db84-43b6-9ea7-155d32fee871</axMsg:MessageId> <axMsg:Company>DAT</axMsg:Company> <axMsg:Action>http://schemas.microsoft.com/dynamics/2008/01/services/GeneralJournalService/create</axMsg:Action> </axMsg:Header> <axMsg:Body> <axMsg:MessageParts> <axLGJ:LedgerGeneralJournal> <axLGJ:LedgerJournalTable class="entity"> <axLGJ:DocumentNum>TestDocNum</axLGJ:DocumentNum> <axLGJ:JournalName>IAJJournalName</axLGJ:JournalName> <axLGJ:LedgerJournalTrans class="entity"> <axLGJ:AccountType>Vend</axLGJ:AccountType> <axLGJ:AmountCurCredit>1000</axLGJ:AmountCurCredit> <axLGJ:AmountCurDebit>0</axLGJ:AmountCurDebit> <axLGJ:CashDiscCode /> <axLGJ:Company>DAT</axLGJ:Company> <axLGJ:CurrencyCode>USD</axLGJ:CurrencyCode> <axLGJ:DateCashDisc>1900-01-01</axLGJ:DateCashDisc> <axLGJ:DocumentDate>2017-07-10</axLGJ:DocumentDate> <axLGJ:DocumentNum>TestDocNum</axLGJ:DocumentNum> <axLGJ:Due>2017-08-10</axLGJ:Due> <axLGJ:ExchRate>100</axLGJ:ExchRate> <axLGJ:Invoice>TestDocNum</axLGJ:Invoice> <axLGJ:LedgerDimension> <axTypes:DisplayValue>VendNo123</axTypes:DisplayValue> <axTypes:Account>VendNo123</axTypes:Account> </axLGJ:LedgerDimension> <axLGJ:Payment>30Days</axLGJ:Payment> <axLGJ:PaymId>TestDocNum</axLGJ:PaymId> <axLGJ:TransDate>2017-07-10</axLGJ:TransDate> <axLGJ:Txt>VendNo123 Full Name</axLGJ:Txt> <axLGJ:Voucher>DAT-123456</axLGJ:Voucher> </axLGJ:LedgerJournalTrans> <axLGJ:LedgerJournalTrans class="entity"> <axLGJ:AccountType>Ledger</axLGJ:AccountType> <axLGJ:AmountCurCredit>0</axLGJ:AmountCurCredit> <axLGJ:AmountCurDebit>1000</axLGJ:AmountCurDebit> <axLGJ:CashDiscCode /> <axLGJ:Company>DAT</axLGJ:Company> <axLGJ:CurrencyCode>USD</axLGJ:CurrencyCode> <axLGJ:DateCashDisc>1900-01-01</axLGJ:DateCashDisc> <axLGJ:DocumentDate>2017-07-10</axLGJ:DocumentDate> <axLGJ:DocumentNum>TestDocNum</axLGJ:DocumentNum> <axLGJ:Due>2017-08-10</axLGJ:Due> <axLGJ:ExchRate>100</axLGJ:ExchRate> <axLGJ:Invoice>TestDocNum</axLGJ:Invoice> <axLGJ:LedgerDimension> <axTypes:DisplayValue>604123</axTypes:DisplayValue> <axTypes:Account>604123</axTypes:Account> <axTypes:Values> <axTypes:Value> <axTypes:Name>CostCenter</axTypes:Name> <axTypes:Value>ABC</axTypes:Value> </axTypes:Value> <axTypes:Value> <axTypes:Name>Format</axTypes:Name> <axTypes:Value>DEF</axTypes:Value> </axTypes:Value> </axTypes:Values> </axLGJ:LedgerDimension> <axLGJ:Payment>30Days</axLGJ:Payment> <axLGJ:PaymId>TestDocNum</axLGJ:PaymId> <axLGJ:TransDate>2017-07-10</axLGJ:TransDate> <axLGJ:Txt>VendNo123 Full Name</axLGJ:Txt> <axLGJ:Voucher>DAT-123456</axLGJ:Voucher> </axLGJ:LedgerJournalTrans> </axLGJ:LedgerJournalTable> </axLGJ:LedgerGeneralJournal> </axMsg:MessageParts> </axMsg:Body> </axMsg:Envelope> 

先谢谢你。