Code for Proxies in Enterprise Portal of AX 2012

Posted by Alvin You
2013. 10. 11. 00:10 Dynamics AX

AX에서 제공해주는 Enterprise Portal의 기능 추가나 수정을 위해서는, AX의 Meta정보를 감싸고 있는 Proxy Object에 대해서 기능 추가 및 기존 코드에 대한 수정 작업을 진행해야 한다.

수정 작업을 위해서 Proxy Object에 대한 Source를 Generate 해 주는 과정은 아래 내용을 참고하면 됩니다.

AOT > Tools > Web Development > Proxies

image

아래 Generate Proxies 화면을 통해서 지정된 경로에 소스를 생성시키면 됩니다.

image

'Dynamics AX' 카테고리의 다른 글

SAP vs Oracle vs AX  (0) 2013.10.13
AX VS SAP?  (0) 2013.10.12
Microsoft Dynamics AX Posting Profile Inventory Transactions in Modules (Sub Ledgers)  (0) 2013.10.09
MS Dynamics AX 2012 Posting Profile Concept  (0) 2013.10.09
Employee Services  (0) 2013.10.09

Microsoft Dynamics AX Posting Profile Inventory Transactions in Modules (Sub Ledgers)

Posted by Alvin You
2013. 10. 9. 23:24 Dynamics AX

Sales order

The ledger accounts listed on the Sales order tab pertain only to the item group selected on the Overview tab. Use Packing slip accounts used only if Microsoft Dynamics AX is set to post to the ledger when goods are delivered to a customer. Once the invoice is generated, Microsoft Dynamics AX reverses the Packing slip postings. You use Commission accounts used only if commissions are set up.

Path: Inventory > Setup > Item groups

Column/Field

Description

Examples/Hints

Sales Order tab

Packing slip

If you select Post physical inventory in the Inventory model group and Post packing slip in ledger in the AR parameter, then the cost of inventory is debited to general ledger when goods are delivered.

Ledger transaction when a SO packing slip is updated:

Debit: Packing slip

Credit: Packing slip offset

Packing slip offset

If you select Post physical inventory in the Inventory model group and Post packing slip in ledger in the AR parameter, then the cost of inventory is credited to general ledger when goods are delivered.

Ledger transaction when a SO packing slip is updated:

Debit: Packing slip

Credit: Packing slip offset

Issue

Cost of inventory is credited to general ledger when goods are invoiced. The packing slip postings are reversed.

Ledger transaction when a SO invoice is updated:

Debit: Packing slip offset

Credit: Packing slip

Debit: Cost of Goods Sold

Credit: Inventory

Consumption

Cost of inventory is debited to general ledger when goods are invoiced. The packing slip postings are reversed.

Ledger transaction when a SO invoice is updated:

Debit: Packing slip offset

Credit: Packing slip

Debit: Cost of Goods Sold

Credit: Inventory

Revenue

Sales amount is credited to general ledger when goods are invoiced. The packing slip postings are reversed.

Ledger transaction when a SO invoice is updated:

Debit: Packing slip revenue Credit: Packing slip rev offset Debit: A/R Summary

Credit: Revenue

Discount

If a discount ledger account is specified, the discount amount is debited and the A/R summary account is debited with (Sales – Discount). If an account is not specified then both the revenue and A/R summary account post as (Sales – discount). Posting occurs when goods are invoiced.

Note: This does not include cash discounts. Cash discounts are not recognized until the payment is processed.

Debit: AR Summary (Sales-Disc) Debit: Discount

Credit: Revenue

Commission

Commission amount is debited to general ledger when goods are invoiced.

Ledger transaction when a SO invoice is updated:

Debit: Commission expense Credit: Commission liability

Commission offset

Commission amount is credited to general ledger when goods are invoiced.

Ledger transaction when a SO invoice is updated:

Debit: Commission expense Credit: Commission accrual

 

 

 

Purchase order

The accounts listed on the Purchase order tab pertain only to the item group selected on the Overview tab. Use Packing slip accounts only if Microsoft Dynamics AX is set to post to the ledger when goods are delivered. Microsoft Dynamics AX reverses the Packing slip postings when the invoice is received. Use Standard cost accounts only if inventory is valued at standard cost.

Path: Inventory > Setup > Item groups

Column/Field

Description

Examples/Hints

Purchase order tab

Packing slip

If you select Post physical inventory in the Inventory model group and Post packing slip in ledger in the AP parameter, then the cost of inventory is debited to general ledger when goods are received.

Ledger transaction when a PO packing slip is updated:

Debit: Goods received

Credit: Purchases clearing

Packing slip offset

If you select Post physical inventory in the Inventory model group and Post packing slip ledger in the AP parameter, then the cost of inventory is credited to general ledger when goods are received.

Ledger transaction when a PO packing slip is updated:

Debit: Goods received

Credit: Purchases clearing

Receipt

If you select Post financial inventory in the Inventory model group, then the cost of inventory is debited to general ledger when goods are invoiced. The packing slip postings are reversed.

Ledger transaction when a PO for an inventory item is invoiced:

Debit: Packing slip offset

Credit: Packing slip

Debit: Receipt (Inventory) Credit: A/P Summary

Discount

If you specify a discount ledger account , the discount amount is credited and the A/P Summary account is credited with (Purchase amount – Discount). If an account is not specified, both the Debit and Credit accounts post as Purchase amount – discount. Posting occurs when the invoice is updated.

Note: This does not include cash discounts. Cash discounts are not recognized until the payment is processed.

Debit: Receipt or consumption Credit: A/P Summary

Credit: Discount

Consumption

If you select Post financial inventory in the Inventory model group, then the Variance on item returns is posted to general ledger when the return price varies from the inventory cost price If you do not select Post financial inventory in the Inventory model group, then the purchase price is debited to general ledger when goods are invoiced.

Ledger transaction when a PO invoice is updated for a non-stock or service item:

Debit: Purchase expense Credit: A/P Summary

Fixed receipt price profit

Credit cost variance when actual cost is lower than standard cost. Used if model group is set up to use standard cost.

Debit: Inventory – Actual Cost Debit:Std cost price offset-var. Credit: A/P Summary – Actual Credit: Std cost profit -variance

Fixed receipt price loss

Debit Cost variance when actual cost is higher than standard cost. Used if model group is set up to use standard cost.

Debit: Inventory – Actual Cost Debit: Std loss –variance

Credit: A/P Summary – Actual Credit: Std cost profit offset-var

Fixed receipt price offset

Use this account to offset the standard cost profit or loss.

Often this account is the same as the inventory account.

 

Inventory

The accounts listed on the Inventory tab pertain only to the Item group selected on the Overview tab. The Standard cost accounts are used only if inventory is valued at standard cost.

Path: Inventory > Setup > Item groups

Column/Field

Description

Examples/Hints

Inventory tab

Receipt

Debit increases to the inventory account.

Inventory journal transaction to record the receipt or increase in inventory:

Debit: Receipt (Inventory) Credit: Profit

Issue

Credit decreases to the inventory account.

Inventory journal transaction to record the issue or decrease in inventory:

Debit: Loss

Credit: Issue (Inventory)

Profit

Credit increases to the inventory account.

Inventory journal transaction to record the receipt or increase in inventory:

Debit: Receipt (Inventory)

Credit: Profit

Loss

Debit decreases to the inventory account.

Inventory journal transaction to record the issue or decrease in inventory:

Debit: Loss

Credit: Issue (Inventory)

Fixed receipt price profit

Credit the gained difference in relation to Standard cost. Offset to Inventory Profit or loss. Used if model group is set up to use standard cost.

Inventory journal transaction to record the receipt or increase in inventory:

Debit:Receipt (Inventory@Std cost)

Credit: Std cost profit (Variance) Credit: Profit (Actual cost)

Fixed receipt price loss

Debit the loss difference in relation to Standard cost. Offset to Inventory Profit or loss. Used if model group is set up to use standard cost.

Inventory journal transaction to record the receipt or increase in inventory:

Debit:Receipt (Inventory@Std cost)

Debit: Std loss (Variance)

Credit: Profit (Actual cost)

Fixed asset issue

Account to be debited if item is issued to a fixed asset.

Rounding variance

Account to be debited/credited due to rounding issues.

 

Production

The accounts listed on the Production tab pertain only to the Item group selected on the Overview tab. The Picking list and Report as finished accounts are used only if Microsoft Dynamics AX is set to post "work in process" to the ledger. The Picking list accounts are used to record the estimated costs of raw materials during the production process. The Report as finished accounts are used to record the estimated cost of the finished good. Both Picking list and Report as finished account postings are reversed when the final item calculation is performed. The Issue accounts record the actual cost of raw materials used in production. The Receipt accounts record the actual cost of the finished good that is being received into inventory.

Path: Inventory > Setup > Item groups

Column/Field

Description

Examples/Hints

Production tab

Picking list

If Post physical inventory in the Inventory model group and Post picking list in ledger in the Production parameters are selected, then the estimated cost of raw material inventory is credited to general ledger during the Picking list update.

The picking list journal is used to record the estimated materials needed for a production order. It can be created manually or automatically by back-flushing. Debit: Picking list offset

Credit: Picking list (Inventory)

Report as finished

If the Post report as finished in ledger in the Production parameters is selected, the estimated value of the finished good is debited to general ledger during the Report-as-finished update.

The Report-as-finished journal is used to record quantities completed

Debit: Report as finished (Inv) Credit: Report as finished Offset

Picking list offset account

If Post physical inventory in the Inventory model group and Post picking list in ledger in the Production parameters are selected, then the estimated cost of raw material inventory is debited to general ledger during the Picking list update.

The picking list journal in the Production module can be created manually or automatically. See Production setup section for more information.

Debit: Picking list offset (WIP) Credit: Picking list

Reported as finished offset account

If the Post report as finished in ledger in the Production parameters is selected, then the estimated value of the finished good is credited to general ledger during the Report-as-finished update.

The Report-as-finished journal is used to record quantities completed.

Debit: Report as finished (Inv) Credit: Report as finished Offset

Issue

When a production order is costed, the estimated material costs previously posted are reversed. The actual cost of raw materials is credited in the general ledger.

Debit: Issue offset (WIP)

Credit: Issue (Inventory-raw material)

Issue offset account

When a production order is costed, the estimated material costs previously posted are reversed. The actual cost of raw materials is debited in the general ledger.

Debit: Issue offset (WIP) Credit: Issue (Inventory-raw material)

Receipt

When a production order is costed, the report-as-finished estimated finished good costs are reversed. The actual cost of the finished good is debited in the general ledger.

Debit: Receipt (Inventory - FG) Credit: Receipt offset account (WIP)

Receipt offset account

When a production order is costed, the report-as-finished estimated finished good costs are reversed. The actual cost of the finished good is credited in the general ledger.

Debit: Receipt (Inventory - FG) Credit: Receipt offset account (WIP)

원본 위치 : http://dynamicssoftware.blogspot.kr/2009/11/microsoft-dynamics-ax-posting-profile.html

'Dynamics AX' 카테고리의 다른 글

AX VS SAP?  (0) 2013.10.12
Code for Proxies in Enterprise Portal of AX 2012  (0) 2013.10.11
MS Dynamics AX 2012 Posting Profile Concept  (0) 2013.10.09
Employee Services  (0) 2013.10.09
Dynamics AX 2012 R2: Improved Office Interop capabilities  (0) 2013.10.08

MS Dynamics AX 2012 Posting Profile Concept

Posted by Alvin You
2013. 10. 9. 23:12 Dynamics AX

The posting profiles are the integration point between the sub module (Fixed assets, Payables, Inventory, Banks, Receivables, Project, and Production) and general ledger sub module, it is a set of ledger accounts which are used in generated an automatic ledger entry where transaction occurred. We could select different ledger accounts for each type of sub modules transactions.

The application consultant working with the controller in several workshops during the implementation phases, in the analysis phase to identify the business requirements in financial directions, in the design phase to identify the integrations point through the posting profiles for each module, in the deployment phase apply the posting profile in MS Dynamics AX 2012 and get the user acceptance (UAT) by testing every transaction and ensure that MS Dynamics AX 2012 is generate the correct entry based on the posting profile setup.

MS Dynamics AX 2012 master data are designed to be contained a group for categorization from the sub module point of view, for example the customer groups are build up considering two main sides first side is the customers categorizations for sales reporting (Business domain, Company relations, Customer size, import, and export), and the second side is financial direction, whether setting up the posting profiles based on customer groups where each customer group is mapped into a ledger account.

MS Dynamics AX offers a great flexibility in posting profiles setups where the posting could be on three different levels as the following:-

All Any transaction occurred on any customers will be directed to the ledger account which assigned to all customer
Group Any transaction on a particular customer inherits the posting profile of the customer group to which the customer is assigned.
Table Any transaction occurred on a particular customer will be directed to the ledger account which is assigned in the posting profile

The controllers have a common question during the design phase which level of All, Group, and Table is dominate over the other level, and do we can to assign customer to a specific group, but exceptionally this customer should be directed to another ledger account.

The logic of posting profile domination in MS Dynamics AX 2012 is working as the following, the lowest level is Table where specify customer ID is dominate over Group, and All.

MS Dynamics AX 2012 posting profile

For example: All customers directed to same ledger account, except one group is directed to another ledger account, exceptionally one customer directed to a third ledger account.

User group: DynamicsArabia

- 원본 위치: http://blog.mohamedaamer.com/microsoft-dynamics/ms-dynamics-ax-2012-posting-profile-concept/

Employee Services

Posted by Alvin You
2013. 10. 9. 22:56 Dynamics AX

AX 2012 중 Sharepoint 기반의 서비스를 2가지로 분류해 본다면, Enterprise Portal과 Employee Services 가 존재합니다.

Enterprise Portal은 AX 2012 Client의 Role Center 메인 페이지와 기본적인 ERP 모듈들의 조회 및 Vendor Portal등에 대한 서비스를 제공하는 사이트입니다.

접속 경로 : http://도메인명(서버명):포트/sites/DynamicsAx/Enterprise%20Portal/EPDefaultRoleCenter.aspx?WCMP=DAT&WMI=EPDefaultRoleCenter&WDPK=initial

반면, Employee Services 같은 경우는 직원 대사우 서비스라는 이름으로 부를 수 있는 기능들이 들어가 있습니다. 간략하게 기능들을 열거하면 아래와 같습니다. 아직은 Payroll 부분이 국내 급여 체계를 커버할 수 있는 상황이 아니기 때문에 관련 부분은 사용하기 힘들겠지만 타 모듈과의 연계 부분에 대해서는 적용할 수 있는 부분이 많이 있지 않을까 싶습니다.

- Expenses
- Order products
- Organization
- Approvals
- Team
- Time and attendance
- Timesheets
- Personal information
- Questionnaires

접속 경로 : http://도메인명(서버명):포트/sites/DynamicsAx/EmployeeServices/Enterprise%20Portal/default.aspx?redirected=1&WCMP=DAT&WMI=EPPersonalInformation&WDPK=initial&WMI=EPPersonalInformation

<Welcome to Employee services 화면>

image

Adding a calculated field to a grid

Posted by Alvin You
2013. 10. 8. 00:16 Dynamics AX

Enterprise Portal 개발을 진행하면서, AX Grid에 어떻게 하면 Calculated Field를 표시해 줄 수 있을까를 고민하면서 찾은 방법입니다.

첫번째 사용한 방법은 AX 2012에서 새롭게 소개된 View 의 Computed Field를 추가해서 사용하는 방법을 이용했지만, 다른 문제가 있음을 발견 후 다시 고민고민을 하다가 결국 오늘 두번째 방법을 찾았답니다.

두번째 방법은 이미 X++ 개발을 하셨던 분들에게는 쉬운 방법일 수 있겠지만, 저처럼 C#을 접하고 X++을 개발하는 개발자에게는 조금은 생소한 방법이기 때문에 다른 분들과의 공유를 위해서 이곳에 기록을 남겨 봅니다.

이미 만들어져 있는 VendInvoiceTrans 테이블의 display method인 lineAmountInclTax를 Grid상에 표시하는 방법입니다.

1) VendInvoiceTrans 테이블의 lineAmountInclTax display method

image

2) Grid –> New Control –> RealEdit Type의 칼럼 추가

image

3) DataSource, DataMethod 를 각각 아래와 같이 변경

image

4) Enterprise Portal 상에서 추가된 칼럼 정보 확인

A) Grid에서의 칼럼 순서 표기

image

B)앞의 Amount는 새롭게 추가된 lineAmountInclTax 칼럼이며, 뒤의 Amount는 기존의 LineAmount칼럼임

image

Comparision between X++ and C#

Posted by Alvin You
2013. 10. 5. 01:38 Dynamics AX

AX의 개발 언어인 X++과 MS의 대표적인 개발언어인 C#의 비교자료입니다.

같은 Object-Oriented Programming 언어이지만, OOP의 개념을 어떻게 풀어 넣었느냐에 따라 개발 방법이나 사용 방법은 틀려질꺼라 생각됩니다.

Axapta가 AX 2012 버젼이 되면서 MS의 Backoffice 서버 제품군(Sharepoint Server, Project Server)과의 통합에 많은 주력을 한 듯 보입니다.

Enterprise Portal과 Project Module의 추가를 보면 많은 신경을 쓴 듯 보입니다. 아직 국내에는 활발하게 해당 모듈을 이용한 프로젝트가 많지는 않지만, 향후에는 많은 프로젝트들이 생기길 기대해 봅니다.

Abaper들과 어깨를 견주길 바라며, Xppler 여러분 화이팅입니다.

X++
C#
abstract
class
The modifiers public and private are ignored on class declarations.
There is no concept of a namespace grouping of classes. There are no dots (.) in any class names.
The modifiers public and private can be used to modify class declarations. C# also has the keyword internal, which relates to how classes are grouped together in assembly files.
extends
A class declaration can inherit from another class by using the extends keyword.
A colon (:) is used where the key words extends and implements are used in X++.
final
A final method cannot be overridden in a derived class. A final class cannot be extended.
The keyword sealed on a class means the same thing that final means on an X++ class.
implements
A class declaration can implement an interface by using the implements keyword.
(See extends.)
interface
An interface can specify methods that the class must implement.
An interface can specify methods that the class must implement.
new
The new keyword is used to allocate a new instance of a class. Then the constructor is automatically called.
Each class has exactly one constructor, and the constructor is named new. You can decide what parameters the constructor should input.
The new keyword is used to create a new instance of a class. Then the constructor is automatically called.
Constructor methods themselves are not named new; they have the same name as the class.
null
private and protected
The private and protected keywords can be used to modify the declaration of a class member.
The private and protected keywords can be used to modify the declaration of a class member.
public
A method that is not modified with public, protected, or privatehas the default access level of public.
A method that is not modified with public, protected, or private has the default access level of private.
static
A method can be static, but a field cannot.
Both methods and fields can be static.
super
The super keyword is used in a derived class to access the same method on its base class.
void method2()
{
;
// Call method2 method
// on the base class.
super();
}
The base keyword is used in a derived class to access various methods in its base class.
void method2()
{
// Call methods on
// the base class.
base.method2();
base.method3();
}
this
For a call from one instance method to another on the same object, a qualifier for the called method is required. The keyword this is available as a qualifier for the current object.
For a call from one instance method to another on the same object, a qualifier for the called method is not required. However, the this keyword is available as a qualifier for the current object. In practice, the keyword this can be helpful by displaying IntelliSense information.
finalize
The Object class contains the finalize method. The finalize method is not final, and it can be overridden.
The finalize method appears to resemble the System.Object.Finalize method in C#, but in X++ the finalize method has no special meaning of any kind.
An object is automatically removed from memory when the last reference to the object stops referencing the object. For example, this can happen when the last reference goes out of scope or is assigned another object to reference.
The methods Finalize and Dispose are common on some types of classes.
The garbage collector calls the Finalize and Dispose methods when it destroys and object.
main
Classes that are invoked from a menu have their main method called by the system.
Classes that are invoked from a command line console have their Main method called by the system.

Dynamics AX Hotfix 적용전 확인 사항

Posted by Alvin You
2013. 9. 24. 22:54 Dynamics AX

지난 주말 고객사의 업무 시간을 피해(Retail Business) Dynamics AX 2012 R2의 CU6(Cumulate Update 6) 적용을 작업하면서 느낀점이지만, 확실히 SQL Server의 Transaction Log를 Shrink 시킨 후 작업을 하게 되면 그만큼 속도가 빨리 끝나는 느낌이 들었습니다.

2주전에는 SQL Server Transaction Log를 정리하지 않고, CU6 적용 작업을 진행하면서 다시 Rollback했던 상황과는 다르게 금주에는 성공을 했죠.거기에 Retail POS에 대한 CU6 작업까지 마무리 짓는 상황까지..ㅎㅎ 암튼, 위 내용은 제 개인적인 생각이지만 Hotfix 적용 작업시 참고하시면 될 것 같습니다.

/* SQL Server Transaction Log Shrink Script */

ALTER DATABASE MicrosoftDynamicsAX SET RECOVERY SIMPLE
go

DBCC SHRINKFILE(MicrosoftDynamicsAX)
go

DBCC SHRINKFILE(MicrosoftDynamicsAX_log)
go

EXEC sp_helpdb MicrosoftDynamicsAX

ALTER DATABASE MicrosoftDynamicsAX SET RECOVERY FULL

 

아래 이미지는 Retail POS 에 CU6 적용 작업 후 진행시켜야 되는 Database Upgrade 화면입니다.

image image

Item의 Default Order Settings 일괄 생성

Posted by Alvin You
2013. 9. 24. 22:52 Dynamics AX

아래 Job을 통해서 Default Order Settings(Inventory, Purchase Order, Sales Order)를 생성 시킬 수 있습니다.

static void Set_DefaultOrderSettings(Args _args)
{
    InventTable inventTable;
    InventItemInventSetup invent;
    InventItemPurchSetup purch;
    InventItemSalesSetup sales;
    ;
    delete_from invent;
    delete_from purch;
    delete_from sales;
    while select inventTable
    {
        if(!InventItemPurchSetup::findDefault(inventTable.ItemId))
        {
            InventItemPurchSetup::insertDefault(inventTable.ItemId);
        }
        if(!InventItemInventSetup::findDefault(inventTable.ItemId))
        {
            InventItemInventSetup::insertDefault(inventTable.ItemId);
        }
        if(!InventItemSalesSetup::findDefault(inventTable.ItemId))
        {
            InventItemSalesSetup::insertDefault(inventTable.ItemId);
        }
    }
}

Listpage와 Formpart간의 데이터 전송 이슈ㅜ.ㅜ

Posted by Alvin You
2013. 9. 24. 22:48 Dynamics AX

프로젝트 구축사의 요구사항 중 하나인 Vendor Portal의 추가 페이지를 개발하면서, 맞딱트리고 있는 이슈중에 하나인 아래 내용을 일주일이 넘게 고민하다가 결국엔 MS Technical Support팀에 도움을 요청한 상태입니다.

이슈 : Enterprise Portal의 Listpage의 특정 칼럼의 Total을 좌측의 Formpart에 표시

단순한 칼럼레벨의 Detail의 내용을 보여주는것은 쉽게 구현이 가능하지만, Listpage에 보여지는 값들의 총 합계 내용을 보여주는 방법은 쉽지가 않음을 절실하게 깨달았습니다.

아래 이미지는 MS에 이해력을 돕고자 만든 내용이랍니다. 혹시 이와 비슷한 고민을 해 보시거나 해결 방법을 아시는 고수님들이 계신다면 도움 부탁 드릴께요…ㅜ.ㅜ

image

Create Dynamic Table in the X++

Posted by Alvin You
2013. 9. 24. 00:08 Dynamics AX/Development

AX상에서 테이블 생성을 Manual로 일일이 작업하는 동료를 보며, SQL처럼 스크립트 같은걸 만들어 놓고 동일 작업이 필요할 경우 작업할 수 있는 방법은 없을지 찾다가 발견한 솔루션입니다.

이 내용을 통해서, 많은 X++ Developer들의 개발 생산성이 향상되길 빌며…

static void newTableCreate(Args _args)
{
TreeNode treeNode;
AOTTableFieldList fieldList;
#AOT
;
treeNode = TreeNode::findNode(#TablesPath);

treeNode.AOTadd("KOR_SalesTable");
SqlDataDictionary::synchronize();

fieldList = treeNode.AOTfindChild('KOR_Table').AOTfindChild('fields');
fieldList.addString('KOR_Field1');
fieldList.addString('KOR_Field2);

SqlDataDictionary::synchronize();
print "Table Created";
pause;
}