Not getting number sequence id While inserting record using class and insert method in table in D365

I am inserting record in a table and at the time of insertion i want to create number sequence in that table ,But m not getting number sequence id .Please find the attachment and code below for further details.

select firstOnly numSeqTable
where numSeqTable.RecId == ITLINMFDealSlip::numRefDealslipIdPurch().NumberSequenceId;

if (numSeqTable )
{
numberseq =numberseq::newGetNumFromCode(numSeqTable.NumberSequence);
mfDealslip.MFDealSlipId = numberseq.num(); //numberseq::newGetNumFromCode(numSeqTable.NumberSequence).num();
}

mfDealSlip.insert();

Thanks & regards

Anshu Anand