Kullanıcı grubundaki kullanıcıları bulmak

static void userGroupUsers(Args _args)
{
    UserGroupInfo   userGroupInfo;
    UserGroupList   userGroupList;
    UserInfo        userInfo;
    ;

    while select userInfo
        join userGroupList where    userInfo.Id        == userGroupList.UserId
        join userGroupInfo where    userGroupInfo.Id   == userGroupList.GroupId &&
                                    userGroupInfo.name == "DRT-Kalite"
    {
        info(userInfo.id);
       // queryBuildDataSource.addRange(fieldnum(SysUserInfo, id)).value(userInfo.id); bir datasource'a range eklemek için
    }
}

Formu ayrı parçalara bölmek için “form splitter”

Ax’ta hazır olarak gelen tutorial’lar sayesinde geliştirmelerinizi daha hızlı yapabilirsiniz. Formu ayrı parçalara bölmek için AOT > Forms altında yer alan “tutorial_Form_Split” formunu çoğaltabilirsiniz.

 

Diğer bulabileceğiniz tutorial mekanları

  • Tables
  • Classes
  • Data Sets
  • Reports

Fiziksel stok miktarını boyutlar detayında alabileceğiniz sorgu

Fiziksel stok miktarını boyutlar detayında(Konfigürasyon, marka, birim seti) alabileceğiniz sorgu.

Qty calcInvent(ItemId _ItemId, configId _configId, InventSizeId _InventSizeId, InventColorId _InventColorId)
{
    InventTrans                 inventTrans;
    InventDim                   inventDim;
    InventDimCombination        inventDimCombination;
    ;

    select sum(Qty) from inventTrans
        where inventTrans.ItemId                == _ItemId &&
              inventTrans.Qty                   != 0 &&
              inventTrans.DatePhysical          != datenull() && // sevk irsaliyesi kesilmiş
              inventTrans.TransType             != InventTransType::QuarantineOrder // referansı karantina olmayan
        join  inventDim
        group by configId, InventSizeId, InventColorId
        where inventTrans.InventDimId           == inventDim.InventDimId &&
              inventDim.InventLocationId        != 'ANT_FARK' && // istemediğim depoları hariç tut
              inventDim.InventLocationId        != 'ANT_HASAR' &&
              inventDim.InventLocationId        != 'ANT_KONS' &&
              inventDim.InventLocationId        != 'ANT_TAKIP' &&
              inventDim.InventLocationId        != 'IZM_FARK' &&
              inventDim.InventLocationId        != 'IZM_KONS' &&
              inventDim.InventLocationId        != 'MRS_FARK'
        join  inventDimCombination
        group by ItemId, configId, InventSizeId, InventColorId
        where inventDim.configId                == inventDimCombination.configId &&
              inventDim.InventSizeId            == inventDimCombination.InventSizeId &&
              inventDim.InventColorId           == inventDimCombination.InventColorId &&
              inventDimCombination.configId     == _ConfigId &&
              inventDimCombination.InventSizeId == _InventSizeId &&
              inventDimCombination.InventColorId== _InventColorId;

    return inventTrans.Qty;
}

Bekleyen satış siparişi miktarını bulmak

Bekleyen satış siparişi miktarını boyutlar detayında(Konfigürasyon, marka, birim seti) alabileceğiniz sorgu.

Qty calcSalesOrder(ItemId _ItemId, configId _configId, InventSizeId _InventSizeId, InventColorId _InventColorId)
{
    InventTrans                 inventTrans;
    InventDim                   inventDim;
    InventDimCombination        inventDimCombination;
    ;

    select sum(Qty) from inventTrans
        where inventTrans.ItemId                    == _ItemId &&
              inventTrans.Qty                       != 0 &&
              inventTrans.DatePhysical              == datenull() && // Sevk irsaliyesi kesilmemiş
              inventTrans.TransType                 == InventTransType::Sales // Referansı satış siparişi
        join  inventDim
        group by configId, InventSizeId, InventColorId
        where inventTrans.InventDimId               == inventDim.InventDimId
        join  inventDimCombination
        group by ItemId, configId, InventSizeId, InventColorId
        where inventDim.configId                    == inventDimCombination.configId &&
              inventDim.InventSizeId                == inventDimCombination.InventSizeId &&
              inventDim.InventColorId               == inventDimCombination.InventColorId &&
              inventDimCombination.configId         == _ConfigId &&
              inventDimCombination.InventSizeId     == _InventSizeId &&
              inventDimCombination.InventColorId    == _InventColorId;

    return -1 * inventTrans.Qty;
}

İşinize yarayabilecek ax date functions.

static void date_Functions(Args _args)
{
Transdate d;
;

d = today();

info(strfmt("Date – %1",d));

//Gets the month for the given date…
info(strfmt("Month – %1",mthofYr(d)));

//Gets the month name from the given date…
info(strfmt("Month Name – %1",mthname(mthofYr(d))));

//Gets the day for the given date…
info(strfmt("Day – %1",dayOfMth(d)));

//Gets the day name from the given date…
info(strfmt("Day Name – %1",dayname(dayOfMth(d))));

//Gets the year for the given date…
info(strfmt("Year – %1",year(d)));

//Gets the current weekday number from the date…
info(strfmt("Weekday number – %1",dayOfwk(d)));

//Gets the day of the year from the given date…
info(strfmt("Day of year – %1",dayOfyr(d)));

//Gets the week of the year from the given date…
info(strfmt("Week of the year – %1",wkofyr(d)));

//Gets the end of the month from the given date…
info(strfmt("Enf of the month – %1", endMth(dateMthFwd(d, 0))));

//Gets the previous month from the given date…
info(strfmt("The previous month – %1",prevMth(d)));
}

Çalıştırdığınızda karşınıza çıkacak ekran