Generate Product Receipt Number Automatically using Number sequence.

Hello, All.

I want to auto populate the Product Receipt Field using a number sequence while posting Product receipt for a Purchase order.

I have created a number sequence for that field, I dont know how to map the value here.

i have tried the following ways to solve it, even then I couldn't achieve it.

I have created the below mentioned methods in PurchEditLinesForm class

and have override the same methods in PurchEditLinesForm_PackingSlip.

I have called these methods from Form datasource levels. but no value is getting updated.

please provide any suggestions on how to achieve this.