not updating record while receiving " Transfer order"

Dear all,
Inventory Management(module) << Periodic << TransferOrders (Posting button –Receive)
In my scenario a record should be created in TableA while receiving TransferOrder .
Accordingly I have added code in clicked method of OK command button of InventTransferParmReceive form. Path :: InventTransferParmReceive << Design << ButtonGroup :: Command <<CommandButton::Ok << clicked method
void clicked()
{
if (inventTransferParmLine.checkInventRegNum_IN())
{
TableA.field1 = “nnn”;//Added code
**TableA.insert();//**Added code
super();
}
}
Sometimes record is not created in TableA even though Transfer order received…

Will you please suggest me why its happening sometimes even though transfer order received successfully.

regards,
Krishna

You need have your code, after the inventTransferUpd class creates the inventTransferJournalLines from inventTransferparmLine

\Classes\InventTransferUpd\createInventTransferJourLine (If it is AX 2012, you can add post event handler to do insert in your custom table)

Thanks for the reply kranthi.

Could you please clear my query.

  1. Why Could not place code here(Clicked method).

I think that it should execute the piece of code(written in Clicked()) always ,when the transfer order received successfully.

Regards,

Krishna

That will be executed on the client, which is not suggested.

thanks for your valuable suggestion.

is there any way to figure out the problem.

Thanks,

Krishna