static void FAN_GLImport(Args _args)
{
AxLedgerJournalTable header = new AxLedgerJournalTable();
AxLedgerJournalTrans trans = new AxLedgerJournalTrans();
container ledgerDim, offsetDim;
LedgerJournalNameId ledgerJournalNameId = "GeneralJR";
DimensionAttributeValueCombination ledgerDimension;
LedgerJournalACType accType, offsetAccType;
BankAccountTable bankAccountTable; ;
accType = LedgerJournalACType::Ledger;
offsetAccType = LedgerJournalACType::Bank; header.parmJournalName(ledgerJournalNameId);
header.save(); trans.parmAccountType(accType);
trans.parmJournalNum(header.ledgerJournalTable().JournalNum); //If account type is Ledger
ledgerDim = ["142102-C-ADMIN","","C","ADMIN"];//First is Display value, followed by Main Account and then dimensions. //If account type is other than ledger then Switch case statement can be written to get RecId from DimensionAttributeValueCombination Table. trans.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(ledgerDim));
trans.parmAmountCurDebit();
trans.parmOffsetAccountType(offsetAccType); switch(offsetAccType)
{
case LedgerJournalACType::Bank : select firstOnly bankAccountTable
join RecId from ledgerDimension
where ledgerDimension.DisplayValue == bankAccountTable.AccountID
&& bankAccountTable.AccountID == "ICICI Bank";
trans.parmOffsetLedgerDimension(ledgerDimension.RecId); //Same cases has to be written for others like Vendor, Customer. Except Account type ledger
//If offset account type is ledger then trans.parmOffsetLedgerDimension() will only be supported.
} //trans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(offsetDim));
trans.save(); }

How to using x++ code create GL journal[AX2012]的更多相关文章

  1. How to using to code import to GL journal[AX2012]

    static void THK_importLedgerJournalTrans(Args _args) { Filename fileName = "C:\\Users\\ksiu3880 ...

  2. Visual Studio Code create the aps.net core project(Visual Studio Code 创建asp.net core项目)

    Install the C# plug-in as shown below: Perfom the dotnet new --help command as shown below: Enter a ...

  3. Oracle Applications Multiple Organizations Access Control for Custom Code

    档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code ...

  4. How to: Synchronize Files by Using Managed Code

    The examples in this topic focus on the following Sync Framework types: FileSyncProvider FileSyncOpt ...

  5. 转载:Character data is represented incorrectly when the code page of the client computer differs from the code page of the database in SQL Server 2005

    https://support.microsoft.com/en-us/kb/904803 Character data is represented incorrectly when the cod ...

  6. URAL 1780 G - Gray Code 找规律

    G - Gray CodeTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view ...

  7. 002.Create a web API with ASP.NET Core MVC and Visual Studio for Windows -- 【在windows上用vs与asp.net core mvc 创建一个 web api 程序】

    Create a web API with ASP.NET Core MVC and Visual Studio for Windows 在windows上用vs与asp.net core mvc 创 ...

  8. Object Detection with 10 lines of code - Image AI

    To perform object detection using ImageAI, all you need to do is Install Python on your computer sys ...

  9. WPS 2019 How To Create New Sheets For Each Row In Excel?

    https://www.extendoffice.com/documents/excel/3197-excel-create-new-sheet-for-each-row.html  How To C ...

随机推荐

  1. 推荐一个代码生成工具:freemarker

    freemarker:http://freemarker.org/ 还有velocity:http://velocity.apache.org/

  2. css first-letter实现首字(字母)下沉效果

    css 首字下沉效果原理 首字下沉主要使用到css的first-letter伪元素,然后配合使用font-size和float来设置文字的样式即可实现. first-letter选择器选取指定元素文本 ...

  3. HDU 1856

    http://acm.split.hdu.edu.cn/showproblem.php?pid=1856 对于这道题,主要就是让你求出有最多结点的树的树叶: 我们只要利用并查集的知识吧所输入的数据连接 ...

  4. android 拍照,裁切,上传圆形头像, 图片等比缩放

    最近太忙了,没有空更新博客,其它部分以后再更新: 今天给大家分享的是解决解析图片的出现oom的问题,我们可以用BitmapFactory这里的各种Decode方法,如果图片很小的话,不会出现oom,但 ...

  5. Solr数据库连接之多表关联

    Solr环境配置好后,有很多时候我们需要把数据库里的数据添加到索引里,这时就需要配置跟数据库的连接,下面我们看配置的步骤. 1. 配置 solrconfig.xml  (在slor 主目录 core ...

  6. 【PL/SQL练习】DML语句的处理(可以处理多行数据)

    1.Insert (在表中插入一行数据,并查看) SQL> desc t1; Name Type Nullable Default Comments ---- ------------ ---- ...

  7. POJ2001-Shortest Prefixes-Trie树应用

    沉迷WOW又颓了两天orz,暴雪爸爸要在国服出月卡了...这是要我好好学习吗?赶紧来刷题了... OJ:http://poj.org/problem?id=2001 题目大意是求所有字符串里每一个字符 ...

  8. SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR

    将一批Job从一台agent服务器搬到另外一台agent, 没有做任何的修改,但是job执行的时候报错. Error: 2014-07-03 14:42:57.14 Code: 0xC0209303 ...

  9. WF4与MVC结合示例

    很多初学者,首先最想解决的问题是:如何将WF与MVC程序相结合.由于Web程序属于长时间运行的流程,因此持续化功能的运用就非常重要了. 本文将结合书签.WorkflowApplication.生命周期 ...

  10. 【IHttpHandler】了解 IHttpHandler

    1 .概述 说明:HttpHandler是一个HTTP请求的真正处理中心.在HttpHandler容器中,ASP.NET Framework才调用HttpHandler的ProcessRequest成 ...