Need to restrict the user not to delete when the status is in checkout

And in write method of datasource I added this code:
AX_TransactionLine_ds.research();

You are stopping the creation of new record based on the current selected record status. Is that your requirement?

Why do you need to call research in write()? It doesn’t make sense in this context.

AX_TransactionLine_ds.allowCreate(AX_TransactionHeader.Transaction_Status==Transaction_Status::Open);

I can add the lines only when the transaction is open.

Wen i don’t give research in write method for lines, its not allowing me to create new lines for a transaction…

No it’s not allowing me to add line now, wat should i do now??

I can’t create new line now for an Transaction

Remove that line of code, if yo don’t want to restrict the create.