Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Thursday, June 19, 2014

Issue of refresh in form automatically record points to first potion in X++

Hi,
// use below code in datasource refresh of field modified or depends on your requirement
public void refresh()
{
    int i;
    //Alfasith to retain the cursor position by getting the position and setting the position
        i = dnSalaryCalculationTrans_ds.getposition();
  //  info(int2str(i));
   if(i != 1)  // Declare the k & m as int in global declaration
        m = i;
    if(!(k == m && k == i))
        k = m;
    if(k)
    {
        dnSalaryCalculationTrans_ds.research(); // Data source that I used
        dnSalaryCalculationTrans_ds.refresh();
        dnSalaryCalculationTrans_ds.setposition(k);        
    }
    super();
}

Regards,

Calculate SalesTotal class and related information in X++

Hi,

static void SalesTotalAlfasith(Args _args)
{
    SalesTotals   salesTotals;
    SalesTable   salesTable;
    container   displayFields;
    str    totalTax, amountWithoutTax, amountInclTax;

    salesTable = salesTable::find('SO-101269');
    salesTotals  =  SalesTotals::construct(salesTable, salesUpdate::All);
    salesTotals.calc();
    displayFields =  salesTotals.displayFieldsCurrency(salesTotals.currencyCode());

    print   conpeek(displayFields, TradeTotals::posBalance());
    print   conpeek(displayFields, TradeTotals::posEndDisc());
    print   conpeek(displayFields,TradeTotals::posTaxTotal());
    pause;
}

Regards,

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...