Pages

Banner 468 x 60px

 

Monday, March 27, 2017

Research in x++

0 comments
Agar filter setelah update atau action tidak berubah

GG_FPJVoucher_ds.research(true);


void Batal()
{
    GG_FPJVoucher           Get_GG_FPJVoucher, getRemarked;
    voucher                 _voucher;
    Salesline               _Salesline;
    ;

    Get_GG_FPJVoucher = GG_FPJVoucher_ds.getFirst(true);

    //while(Get_GG_FPJVoucher)
    if(Get_GG_FPJVoucher)
       {
            _voucher = Get_GG_FPJVoucher.Voucher;

              ttsbegin;
                  while select forupdate getRemarked where getRemarked.Voucher == _voucher
                  {
                      getRemarked.BIT_Batal     = noyes::Yes;
                      getRemarked.Status        = GG_OpenClose::Closed;
                      getRemarked.update();
                  }
              ttscommit;


              // added by adit - remove dan ubah status di SO Status Salesline menjadi Open
               ttsbegin;
                   while select forupdate _Salesline where _Salesline.SalesId == Get_GG_FPJVoucher.SalesId
                                         && _salesline.BIT_ReferenceRealisasi == Get_GG_FPJVoucher.BIT_ReferenceRealisasi
                   {
                      _salesline.BIT_StatusSO    = BIT_StatusSO::Open;
                      _salesline.update();
                   }
               ttscommit;

              info(strfmt("List Id %1 sudah dibatalkan", Get_GG_FPJVoucher.FPJVoucherId));

              Get_GG_FPJVoucher = GG_FPJVoucher_ds.getNext();
       }

   GG_FPJVoucher_ds.research(true);
}

0 comments:

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH