Tuesday, January 8, 2019

Updating Isprimary field in LogisticsElectronicAddress Table

static void IsPrimaryFieldUpdate(Args _args)
{
    //kavin
    LogisticsElectronicAddress    addr;
    int                           updatedCount;

    updatedCount =0;
    ttsBegin;
    while select forUpdate IsPrimary from  addr
        where addr.Type == LogisticsElectronicAddressMethodType::Fax
    {

        addr.IsPrimary = NoYes::Yes;
        addr.doUpdate();
        updatedCount++;

    }
    ttsCommit;

    info(strFmt("No Of Records Updated:%1",updatedCount));
    info('done');

}

No comments:

Post a Comment