Hello Everyone,

I need to add a button to remove a particular months number seq. I need x++ code to remove the NumSeq by following generation code. We are working on Axapta 3.0

while select ABCD_LeaseNumberseq
{
Numbersequencetable.NumberSequence = ABCD_LeaseNumberseq.NumberSequenceName+'/'+state.StateId +'/'+Substr(mthname(mthofYr(Inputdate)),1,3)+'-'+substr(int2str(year(inputdate)),3,4);
Numbersequencetable.Txt = ABCD_LeaseNumberseq.NumberSequenceName+'-'+mthname(mthofYr(inputdate))+'-'+substr(int2str(year(inputdate)),3,4);

Numbersequencetable.Format = ABCD_LeaseNumberseq.Voucherseries + '/' +StateId+'/'+int2str(mthofYr(Inputdate))+substr(int2str(year(inputdate)),3,4)
+'/'+'####';


Numbersequencetable.Lowest = 1 ;
Numbersequencetable.NextRec = 1;
Numbersequencetable.Highest = 999999;
Numbersequencetable.Continuous = noyes::Yes;
Numbersequencetable.insert();
NumberSequenceChild.NumberSequenceChild = Numbersequencetable.NumberSequence;
NumberSequenceChild.NumberSequenceCode = ABCD_LeaseNumberseq.NumberSequenceName;

NumberSequenceChild.ValidUpTo = dateEndMth(Inputdate);
NumberSequenceChild.state = state.StateId;
NumberSequenceChild.insert();

}

Thank you.