目前分類:ERP - Dynamics 365 ( AX) (115)

瀏覽方式: 標題列表 簡短摘要
CustTable custTable;
    boolean   a = false; //this boolean a might be changed to true
    Query query;
    QueryRun queryRun;
    Querybuilddatasource qbds;
    QuerybuildRange qbr;

    Query = new Query();
    qbds = query.addDatasource(tablenum(CustTable));
    qbr = SysQuery::findOrCreateRange(qbds, (fieldnum(CustTable, AccountNum)));

    if (a == true)
    {
        qbr.value(queryvalue("DEMO-0001"));
    }
    else
    {
        qbr.value(queryvalue("DEMO-0002"));
    }
 
    QueryRun = new QueryRun(query);

    while (queryRun.next())
    {
        custTable = queryRun.get(tablenum(CustTable));
        info(strfmt("AccountNum %1", custtable.AccountNum));
    } 

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

   // Get email template from URL
        URLUtility urlUtility = new URLUtility();

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

1. 加新work user:

image

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

根據UserInfo的Locale 來計算datetime format sequence 

Settings> User Option:

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

        SysInfoLogEnumerator            infoLogEnum;
        SysInfologMessageStruct         infoMessageStruct;

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

     //procurement attribute
                    // find or create brand value

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

 

通過X ++創建產品並發布產品 (AX 2012):

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

The Excel integration is one of the powerful tools in Microsoft Dynamics 365 for Finance and Operations. This is helpful tool for accountants to push journal entries through Excel to Microsoft Dynamics 365 for Finance and Operations. The out of the box Excel integration does not have the financial dimensions values, but it could be exposed to the Excel integrations. Of course, the importance of financial dimensions specially the entry will be validated based on the account structure setup.

This blog post will illustrate step by step how to Expose the Financial dimensions on Excel integration. This will need to follow certain steps on Dynamics 365 for Finance and Operations client, Visual Studio, and Excel.

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

主要:

Primary Table

A primary table is any table that will be used to restrict data in the constrained table. It is the table that is specified in the policy query.

Constrained Table

A constrained table is a table on which data filtering is applied. It can be a primary table or a table that is related to the primary table.
文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

1. 用admin 身份登入 AAD (Azure active directory)  :  https://azure.microsoft.com/en-us/services/active-directory/

2. Find User:

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

 
InventTable                          inventTable;
InventDimParm                        inventDimParm;
文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

Dynamics AX在不同時區完美工作的能力背後的秘密是其utcDateTime數據類型。它將日期,TimeOfDay和時區信息組合到一個數據類型中,使顧問能夠以更接近我們在日常生活中思考時間的方式來實現與日期和時間相關的要求。與AX中的其他數據類型一樣,utcDateTime也可以根據需要擴展,並用作數據庫字段的後備類型。

utcDateTime transDateTime;

transDateTime = utcDateTimeNull();
transDateTime = DateTimeUtil :: utcNow();

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

  • D365 更改了找尋account num 的方法. AX :  info(strFmt("%1",DimensionStorage::getDynamicAccount(accountNum , enumValue)))
  • Find the account number from business login in D 365.
  • Get the financial dimensions from integration.
  • Create a journal line from above info.



Code to do above is as follows:

DimensionDynamicAccount ledgerAccount;
switch(<AccountType>)
{
case (LedgerJournalACType::Cust) :
ledgerJournalTrans.AccountType = LedgerJournalACType::Cust;
ledgerAccount = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(<AccountNum>, LedgerJournalACType::Cust);
ledgerJournalTrans.LedgerDimension = ledgerAccount;
break;
case (LedgerJournalACType::Ledger) :
ledgerJournalTrans.AccountType = LedgerJournalACType::Ledger;
ledgerAccount = LedgerDefaultAccountHelper::getDefaultAccountFromMainAccountRecId(MainAccount::findByMainAccountId(<AccountNum>).RecId);
if(<DefaultDimensionIntegrationValues string from integration>)
{
DefaultDimensionIntegrationValues ledgerString = <AccountNum> + enum2Str(DimensionParameters::find().DimensionSegmentDelimiter) + <DefaultDimensionIntegrationValues string from integration>;
LedgerAccountDimensionResolver dimResolver = LedgerAccountDimensionResolver::newResolver(ledgerString);
ledgerAccount = dimResolver.resolve();

}
ledgerJournalTrans.LedgerDimension = ledgerAccount;
break;
case (LedgerJournalACType::Vend) :
ledgerJournalTrans.AccountType = LedgerJournalACType::Vend;
ledgerAccount = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(<AccountNum>, LedgerJournalACType::Vend);

ledgerJournalTrans.LedgerDimension = ledgerAccount;
break;
}

you need to replace <AccountNum> with your Account number variable and <DefaultDimensionIntegrationValues string from integration> with your Financial dimension string.

 

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

class DGS_CommonDimension
{

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

1. 初次化時 (UI 方法)

On a TabPage control on forms there is a property called FastTabExpanded.
The property controls weather the FastTab appears expanded or collapsed and how this can be changed by the user.

FastTabExpandedProperty

The default value is Auto.

Values:

FastTabExpandedEnumValues

Auto

Default value. Decision is taken by the system. User settings are considered.

Yes

When a user opens the form for the first time, the FastTab appears expanded. As soon as the user collapses the FastTab, this is getting stored in the users usage data and the next time opening the form the FastTab appears collapsed (or whatever state the user defined for the FastTab before leaving the form).

No

Behaves like the option Yes but on the first opening the FastTab appears collapsed.

Always

The FastTab always appears expanded and the user cannot collapse the FastTab!

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

class DGS_PostPurchaseReceiptServiceTask extends RunBaseBatch
{

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

[ExtensionOf(formStr(PurchTable))]
final class DGS_PurchTable_Form_Extension

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

class DGS_CommonDimension
{

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

-- DimensionAttribute (  Financial Dimension via different table )
select DEFAULTDIMENSION,* from vendtable where DATAAREAID ='usmf'

lionlionchopper 發表在 痞客邦 留言(0) 人氣()

class DGS_PurchTableFormEventHandler
{

文章標籤

lionlionchopper 發表在 痞客邦 留言(0) 人氣()