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

瀏覽方式: 標題列表 簡短摘要

問題: 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) 人氣()

 

/// <summary>

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

[ExtensionOf(formStr(DimensionValueDetails))]
final class DimensionValueDetails_extension

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

 [DataSource]
    class ABCView

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

 public void lookup()
        {

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

Name Used how Example
dayRange (dayRange(-1,2)) gives a query result of all records from yesterday until the day after tomorrow.

 

Note that it is unfortunately not possible to use decimals, only full days work.

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

SQL : 可以用 curExt() :

where dataareaId = curExt() ;

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

  smmParametersTable smmParameters;
            QueryBuildDataSource     qbds;

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

 /// <summary>
        ///

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

 

文章標籤

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

// 輸入 : (1) 需要分拆的字元 , (2) 分折字元符號 , (3) 分折後退回指定字元 

public static str strSplit(str _splitString,str _splitchar,int _pos)

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

DS 資料都LOOP一次 :

InventTrans                 localInventTrans = InventTrans_DS.getFirst() as InventTrans;

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