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

瀏覽方式: 標題列表 簡短摘要
 Dynamics AX has standard functionality to show a prompt for any common fields on Sales Header & Lines are being updated on header.
 
文章標籤

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

[Form]
public class CostUpItem extends FormRun

文章標籤

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

基本: 其實只要servicetask 一個就可以做成BATCH JOB, 4個CLASS 是因為需要dynamic filter 可以給我自動篩選指定資料.

 

文章標籤

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

  public static void clearReservedPhysical(SalesLine salesLine)
    {

文章標籤

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

頁面: System Administration  > Setup > Email > Email parameters

1. 設定 Email Batch 使用SMTP 為預設值:

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

Runnable Class開啟使用方法:

1. 把runnable class 設定為 startup object , 直接開啟debug mode 就可以了. 

文章標籤

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

解決積存舊AOT Query Cache 在 D365FO 方法:

1. From Setting on the Top

文章標籤

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

 

Database Lookup 顯示名字而不是id : (Testing Lookup database)

文章標籤

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

1. 用X++Code來建立Queries
// Code using X++ to build the query
Query                   query;
QueryRun                queryRun;
QueryBuildDataSource    qbds;
ProjTable               ProjTable;
;

query    = new Query();
// Add a datasource to the query
qbds     = query.addDataSource(tableNum(ProjTable));
// Add a range to the newly added datasource.
qbds.addRange(fieldNum(ProjTable, ProjId)).value("00403_1036..00412_1036");
   
queryRun = new QueryRun(query);
   
while(queryRun.next())
{
   projTable  =   queryRun.get(tableNum(ProjTable));
   info(projTable.ProjId + ", " + ProjTable.Name);
}
 
文章標籤

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

Display Method 在AX/D365 的正確使用方法:

1. 需要放在Table(view) class 內.

文章標籤

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

public void registerTransaction(SalesLine salesLine)
    {

文章標籤

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

問題: Item ITM-xxxxxx is on hold for transactions.

解決方法:  On you item, click the "default order settings, click sales order, check the whether the stopped tick is on.

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

1. 建立一個全新的 CLASS 而且 overrides TradeOrderLineRegister


文章標籤

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

Passing a value between Pre and Post event handler using XppPrePostArgs:

public static class MyTableEventHandler_XppPrePostArgs
{
    const static str myFieldHasChangedArgName = 'myFieldHasChanged';

    [PreHandlerFor(tableStr(MyTable), tableMethodStr(MyTable, update))]
    public static void MyTable_Pre_update(XppPrePostArgs _args)
    {
        MyTable myTable = _args.getThis() as MyTable;

        boolean myFieldHasChanged = myTable.MyField != myTable.orig().MyField;

        <strong>_args.addArg(MyTableEventHandler_XppPrePostArgs::myFieldHasChangedArgName, myFieldHasChanged);</strong>
    }

    [PostHandlerFor(tableStr(MyTable), tableMethodStr(MyTable, update))]
    public static void MyTable_Post_update(XppPrePostArgs _args)
    {
        MyTable myTable = _args.getThis() as MyTable;

        <strong>boolean myFieldHasChanged = _args.getArg(MyTableEventHandler_XppPrePostArgs::myFieldHasChangedArgName);
</strong>
        if (myFieldHasChanged)
        {
            myTable.doStuff();
        }
    }
}

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

 public void createSalesLine()
    {

文章標籤

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

  public void setFinancialDimension()
    {

文章標籤

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

 public void exportCSV(str _filename)
    {

文章標籤

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

  str             name;
    Array Arr = new Array (Types::String);
    int             i= 1, j;
    Int test;
   TestTable TestTable;
    ;

    // Create an Str array

    // Write some elements in it
    while select TestTable
    {
        Arr.value(i, TestTable.TestTables);//(i, i*2);

        i++;
    }
    j = i;
    

    for (i = 1; i<j; i++)
    {
      
        test= Arr.value(i);
        while select TestTable where TestTable.TestTables == test
        {
            info(strfmt("%1", Arr.value(i)));
        }
    }


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

Return order:
Return order is the process in which customers return items that they have purchased.

Example:
Customer might return items if it is defective or if it was received incorrectly. You need to create a return order in ax before receiving items back from the customer.


Steps to create Return order in AX 2012:

1. First step is to find invoiced sales order against which return order is getting created.
.

 

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

/// <summary>
  /// Hooks on Initialized event of the <c>EcoResProductVariantFlavorDisplayOrderView</c> form data source and adjusts data source query.
  /// </summary>
  /// <param name = "_sender">The data source object that triggers the event.</param>
  /// <param name = "_e">Event arguments.</param>
  [FormDataSourceEventHandler(formDataSourceStr(EcoResProductVariants, EcoResProductVariantFlavorDisplayOrderView), FormDataSourceEventType::Initialized)]
  public void ecoResProductVariantFlavorDisplayOrderView_ValidatingWrite(FormDataSource _sender, FormDataSourceEventArgs _e)
  {
  if (isConfigurationkeyEnabled(configurationKeyNum(Retail)))
  {
  _sender.queryBuildDataSource().addLink(fieldNum(EcoResProductVariantFlavor, DistinctProductVariant), fieldNum(EcoResProductVariantFlavorDisplayOrderView, DistinctProductVariant));
  _sender.queryBuildDataSource().addLink(fieldNum(EcoResProductVariantFlavor, Flavor), fieldNum(EcoResProductVariantFlavorDisplayOrderView, Flavor));
   
  _sender.queryBuildDataSource().addOrderByField(fieldNum(EcoResProductVariantFlavorDisplayOrderView, RetailDisplayOrder));
  _sender.queryBuildDataSource().addOrderByField(fieldNum(EcoResProductVariantFlavorDisplayOrderView, Name));
  }
  }
   
  加range/link 到 新加的datasource [View] (extension) 內:
  /// <summary>
    ///

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

1 23