Alfasith AX

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

Friday, May 16, 2014

Job to check the table before insert in to that concern table for the existence in Dynamic AX

Hi,

static void AlfasithCode2CheckB4Insert(Args _args)
{
container contain;
    str 30 Name;

    int i;
    ContanerTable   ContanerTableLoc;
    contain = ["Ram","Sam","Mam","Kamal","Ram","Raja","Rani","Kamal"];
    for(i = 1; i <= conLen(contain) ;i++)
    {
        name = conPeek(contain,i);
    select ContanerTableLoc where ContanerTableLoc.Names == name;
            if(!ContanerTableLoc)
            {
                ContanerTableLoc.Names = Name;
                ContanerTableLoc.insert();
            }
    }
    info("Process completed...");
}

Regards,

No comments:

Post a Comment

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...