Monday, March 8, 2021

Existing Number Sequence remove or delete

 

        NumberSequenceDatatype  PROLL; // EDT information

        NumberSequenceReference numSeqRef; // Merging relation between EDT and number sequence

        str                 edtName = extendedTypeStr(PROLL);

        ExtendedTypeId      _dataTypeId = extendedTypeName2Id(edtName);


        select forUpdate PROLL

                where PROLL.DatatypeId == _dataTypeId; // EDT Id

        

        delete_from numSeqRef

                where numSeqRef.NumberSequenceDatatype == PROLL.RecId;

        ttsBegin;

            PROLL.delete();

        ttsCommit;


        info( strFmt("Relation with EDT: %1 is removed.", PROLL.DatatypeId) );


No comments:

Post a Comment

How get primary email of customer or vendor

Below code is for customer only, for vendor we need to replace  CustTable  with VendTable.   dirPartyContactInfoView        dirPartyContactI...