web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Delete lines from purch line table based on specific criteria

Abdel Fatah Ahmed Profile Picture Abdel Fatah Ahmed
Delete lines from purch line table based on specific criteria we will write this code inside function or event for example clicked :

void clicked()
{
     PurchLine _purchline;
     int Counter=0;
    ;
    try
    {
        ttsbegin;
          while select forupdate _purchline where(_purchline.PurchReceivedNow==0 &&    _purchline.DIST==noyes::No)
         {
            if(_purchline.receivedInTotal()==0 && substr(_purchline.PurchId,5,-5)!='ERSDX')
            {
                _purchline.delete();                Counter++;
            }
         }
         ttscommit;
         info(strfmt("Number of Lines Deleted : %1",Counter));
    }
 catch
 {
       info(_purchline.PurchId);
 }
}

Comments

*This post is locked for comments