AttachDocument

Posted by Alvin You
2013. 11. 13. 15:05 카테고리 없음

static void AttachDocument(Args _args)
{
    DocuRef    docuRef;
    DocuActionArchive attachDoco;
    LedgerJournalTable ledgJnlTable;
    SalesTable salesTable;
    boolean isValid;
    ;
//    ledgjnlTable = LedgerJournalTable::find("GJ00000059");
    salesTable = SalesTable::find("DAT-000010");

    ttsBegin;
    docuRef.TypeId = "Sharepoint";
    docuRef.RefTableId = tableNum(SalesTable);
    docuRef.RefRecId = salesTable.RecId;
    docuRef.RefCompanyId = curext();
    docuRef.ActualCompanyId = curext();
    docuRef.insert();

    attachDoco = DocuAction::newDocuRef(docuRef);
    attachDoco.add(docuRef, "D:\\DPA-ApplicationDeveloper.pdf");

    ttsCommit;
}

AttachURL

Posted by Alvin You
2013. 11. 13. 15:05 카테고리 없음

static void AttachURL(Args _args)
{
    DocuRef    docuRef;
    DocuActionArchive attachDoco;
    LedgerJournalTable ledgJnlTable;
    SalesTable salesTable;
    boolean isValid;
    ;
//    ledgjnlTable = LedgerJournalTable::find("GJ00000059");
    salesTable = SalesTable::find("DAT-000012");

    ttsbegin;
    docuRef.clear();
    docuRef.Name = "InvoiceUrl";
    docuRef.RefTableId = tableNum(SalesTable);
    docuRef.RefRecId = salesTable.RecId;
    docuRef.RefCompanyId = curext();
    docuRef.TypeId = "URL";
    docuRef.Restriction  = DocuRestriction::Internal;
    docuRef.Notes="http://alvin/sites/DMS/AXDocu/복사본 PMIX_Template_2013 11 07.xlsx";
    docuRef.insert();

    attachDoco = DocuAction::newDocuRef(docuRef);
    ttscommit;
}

 

AX Query에서 사용하는 like operator

Posted by Alvin You
2013. 11. 13. 14:58 Dynamics AX

AX Engine에서 사용되는 Query 작성시 사용할 수 있는 Like 연산자 사용방법에 대한 예제입니다.

 

static void likeOperator(Args _args)
{
    DirPartyTable dirPartyTable;
    ;
 
    select dirPartyTable where dirPartyTable.Name like("*Pusan*");// match with Pusan
    info(dirPartyTable.Name);   
    select dirPartyTable where dirPartyTable.Name like("*Pusan");// end with with Pusan
    info(dirPartyTable.Name);   
    select dirPartyTable where dirPartyTable.Name like("Pusan*");// start with Pusan
    info(dirPartyTable.Name);
}

Data Migration Framework

Posted by Alvin You
2013. 11. 13. 14:02 Dynamics AX

AX 2012의 DMF(Data Migration Framework)에 대한 요약 내용입니다. AX 2012 출시 이후 많은 Business Partner사들이 Excel Addin을 통해 잘못된 Data Migration 작업을 시도하면서 MS에서 발빠르게 준비해서 나온 Data 이관 솔루션입니다.

 

Data Migration Framework within Microsoft Dynamics AX 2012

AX 2012 Model store database and baseline model store

Posted by Alvin You
2013. 11. 13. 13:24 Dynamics AX
Model store database
The model store is the database where all application elements for Microsoft Dynamics AX are stored. Customizations are also stored in the model store. The model store replaces the Application Object Data (AOD) files that were used in earlier versions of Microsoft Dynamics AX.

Baseline model store
The baseline model store holds model store tables for the earlier version of the metadata and is used only during upgrade. The baseline model store is like the old folder in earlier versions of Microsoft Dynamics AX.

Note : In Microsoft Dynamics AX 2012 R2, the model store was moved into a database that is separate from the business database.

System Compile/CIL Compile 자동화 하기

Posted by Alvin You
2013. 11. 12. 17:21 Dynamics AX

AX 서버 설치 후 개발 작업을 진행 하다 보면, System Compile과 CIL Compile과 같은 작업들을 종종 해 주어야 하는 상황이 발생합니다. 문제는 System Compile과 CIL Compile 작업이 서로 연결된 작업이 아니기 때문에 한 작업이 끝나기를 기다려 다시 다른 작업을 돌려줘야 되는 수고를 해줘야 됩니다.이 부분에 대한 수고를 아끼기 위해 아래 batch 스크립트를 통해서 2개의 작업을 자동화 시킬 수 있습니다.

또한 윈도우즈 스케쥴러에 등록해 해당 작업을 예약된 시간에 실행시킬 수 있습니다.

 

작업 순서는 Restart AOS Server -> Full System Compile -> Full CIL Compile -> Restart AOS Server

CompileAll에 있는 _-, _+ 표시는 Cross Reference(상호참조) 정보에 대한 갱신 여부를 뜻합니다.

 

AX Client configuration commands에 대한 자세한 정보는 아래 URL 정보를 참고하시면 자세한 정보를 확인 할 수 있습니다.

http://technet.microsoft.com/en-us/library/aa569653.aspx

 

CIL 기능을 사용하는 AX 기능은 AIF framework, AX Batch Server, AX SSRS Reports 등이 있습니다.

 

-- axcompile.bat

SET serviceName=AOS60$01
SET aosHost=ALVIN
SET aosPort=2712
SET appPath="C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe"

 

::Restart AOS Server
net stop %serviceName%
net start %serviceName%

 

::Perform Full System Compile
%appPath% -aos2=%aosHost%:%aosPort% -startupcmd=CompileAll_- -lazytableloading -lazyclassloading

 

::Perform Full CIL Compile
%appPath% -aos2=%aosHost%:%aosPort% -startupcmd=CompileIl -lazytableloading -lazyclassloading

 

::Restart AOS Server
net stop %serviceName%
net start %serviceName%

Assign users to roles based on the Rule

Posted by Alvin You
2013. 11. 6. 23:13 Dynamics AX

AX 2012의 Role&Security 정의는 생각보다 까다롭다는 이야기를 많이 합니다. 그만큼 Role 정의도 많아졌고, 세부적인 권한 설정까지 정의 하기 위해서는 많은 준비와 시행착오를 감수해야 하기 때문일 것 같습니다.

특히 국내에 보급된 ERP의 메뉴 정의와 권한 셋팅에 익숙해져 있는 국내 IT 관리자들에겐 MS Dynamics AX의 권한 셋팅은 쉽지 않은 작업이라고 생각이 듭니다.

 

오늘은 권한 셋팅 방법 중 하나인 규칙 기반의 Role 할당 방법에 대해서 간략하게 설명을 하려고 합니다.

미리 정의된 직급,직책,부서 단위로 설정된 Query를 통해 관련 사용자 목록을 가져와 자동적으로 연결된 Role에 맵핑을 시켜주는 방법입니다.

 

메뉴 위치 : System Administration >> Setup >> Security >> Assign users to roles

 

Add Rule 버튼을 통해 아래와 같이 미리 정의된 Query문을 가져올 수 있습니다. Query를 추가 하는 방법은 나중에 따로 올리도록 하겠습니다. 아래 Query3를 보시면 별도의 작업을 통해서 추가 할 수 있는걸 확인하실 수 있습니다.

 

AX 2012 프로그램에서 사용되는 단축키 정리

Posted by Alvin You
2013. 11. 5. 00:57 Dynamics AX

AX 2012에 대한 교육 진행시 단축키에 대한 설명을 반복적으로 진행해 주면 고객사 담당자의 반응이 좋답니다.

특히 Ctrl + t, Ctrl + g와 같은 기능은 현업 담당자들을 기쁘게 해 주는 기능입니다.

Description 

Keyboard Shortcut

Help 

F1 

Create a new record* 

Ctrl+n 

Save record 

Ctrl+s 

Open new workspace 

Ctrl+w 

Go to first record in grid 

Ctrl+Home 

Go to last record in grid 

Ctrl+End 

Delete record 

Alt+F9 

Filter by field 

Ctrl+k 

Filter by grid 

Ctrl+g 

Filter by selection 

Alt+F3 

Advanced Filter/sort 

Ctrl+F3 

Remove Filter/sort 

Ctrl+Shift+F3 

Export to Excel 

Ctrl+t 

Move cursor from Sales Order header to order lines 

Ctrl+PgDn 

Refresh the screen with updated data 

Ctrl+F5 

Close all AX screens 

Alt+F4 

Dynamics AX 2012 R2 – Cumulative Update 7 (CU7) released

Posted by Alvin You
2013. 11. 3. 00:40 Dynamics AX

Today Microsoft released a new cumulative update for Microsoft Dynamics AX2012 R2, named Cumulative Update 7 (KB2885603). The version number of this release is 6.2.1000.4051.

You can download the update here.
More information on Partersource and Customersource will be available soon.

There is an installation guide for this update available on the Microsoft Download site. Download it here.

Within this update hotfixes are included as well as some new or enhanced features. Also the prior CU’s are included. It’s good to see Microsoft continues enriching the functionality for Microsoft Dynamics AX even in cumulative updates. There was an additional focus within the next areas:

Update experience

The CU7 update experience is more metadata driven – providing users the ability to view applicable changes, perform impact analysis during install and apply them to their environments on an as-needed basis with auto code update (where possible). The new update experience will also have tighter integration between Lifecycle Services in the cloud and the on premise update installer.

Sales order potency

Create and validate price calculations for sales order items that have a potency. Price calculations are based on the active concentration levels of batch attributes.

Budget planning

  • Create an Excel worksheet template using a wizard.
  • Allocate budget amounts using ledger allocation.

Payroll

Some compliance preparation reports are added for use of the 940, 941, state wage and tax reports. Also preparation reports for VETS and OSHA are available for the US market.

It is possible to create groupings of tax codes that share the same financial data. An user can act on then as group rather than individually. The new tax groups can be used in transaction posting definitions as well.

Another nice enhancement is the functionality for updating benefits rates. A process can be run that compares the default rates to the enrolled rates for each worker and makes any necessary updates. It also provides a way for the user to designate an enrolled rate as “custom” so the update tool will ignore it when processing updates.

You can now use the Payroll cube to analyze information including earnings statements, pay statements, benefit accruals, tax history, arrears, and benefits.

HRM

You can hire or promote a worker using personnel actions. These actions enables the following features:

  • The hire action is added to an action history log for the worker
  • The option to use standard Dynamics AX Workflow before the Hire is committed
  • The option to easily add comments about the hire

Depending on the personnel action type that you use, the hire action can be routed through workflow.

You can now use the HR cube to analyze workforce demographic information, recruiting metrics, compensation, benefits, training courses, seniority, positions, jobs, employment leave, terminations, and more.

On-hand cleanup

The purpose of the On-hand entries cleanup feature is to improve the performance of the on-hand query by deleting records from the inventory on-hand table (InventSum) that are closed and associated with a tracking dimension. Entries in the table that are not associated with a tracking dimension are not deleted. The feature will especially benefit companies that handle large quantities of serialized products.

Product change

Within CU7 functionality is added to document the master data changes needed to accommodate the substitution of a component used in production, and manage the coordinated release of BOMs and routes to production. This functionality is integrated with case management where product cases are routed in this process.

Services industries

It is also good to see some improvements on project functionality:

A Microsoft Project client add-in is included in this update. It enables easy creation and editing in MS Project without requiring Project Server. It supports editing WBS for project, project quotes, and templates including task and category assignment. Additionally it enables tasks to be viewed on SharePoint Online.

Enhancements on the work breakdown structure (WBS) provides a more natural and complete editing surface for project planning, estimation, and monitoring. Several enhancements have been made to provide more effective resource scheduling and assignment. These enhancements include the following abilities:

  • Assign resources using visual, graphic-based tools
  • Form a project team by identifying project roles and competencies required for the team
  • Rationalize team and work breakdown structure assignments • Assign a percentage of a worker’s capacity to a project
  • Make group resource assignments

Also enhancements were made on intercompany project invoicing. The goal of this functionality is to make the control of cost, revenue recognition, taxes, and transfer price for intercompany project transactions in Microsoft Dynamics AX Service Industries more flexible and powerful.

Mobile experiences

Until now you could install updates for enabling functionality on mobile devices such as timesheets and expenses. Within this update this functionality is included out of the box.

Data Import Export Framework

Within CU7 also the Data Import Export Framework is integrated as part of the update. Over 60 entities have been added out of the box. Some new entities are: Number sequence codes, Project contracts and Product variants.

Also the new version of this framework now supports file type XML and Excel.

You can now use a wizard to compare or copy entities from one source company to one or more companies.

 

 

It’s exiting to see the commitment of Microsoft towards the Microsoft Dynamics AX product.

 

That’s all for now. Till next time!

AX 2012 Security Access Level 정의

Posted by Alvin You
2013. 10. 30. 00:15 Dynamics AX

AX 2012 Development I, Chapter 4 (Security)에 나와 있는 Access Level에 관련한 내용입니다.

Correction이라는 항목을 보시면 아시겠지만, 유효한 날짜안에서는 Delete를 제외한 작업을 진행할 수 있습니다.

새롭게 나온 권한 종류라 생소하지만 날짜를 기반에 둔 Business Process 프로그램에 적용하면 될 듯 싶네요.

 

AOT Name
Label Description
No Access No Access Does not provide any access to data.
Read View An end-user can view data.
Update Edit An end-user can view and edit data.
Create Create An end-user can view, edit and create new data.
Correct Correction An end-user can view, edit, create new and correct date-effective record without creating new records.
Delete Full control An end-user can view, edit, create new and delete data.
  Correct is a new level concerning date-effectivity.