Hi,
On the sales header i have to update the status field after it prints a pdf of the sales order.
After printing it must update the status of the Sales header.
On sales line it is updating just after the print,as there is code written on the OnValidate of sales line to modify the status field of sales line.
How can i do the same on Sales header
](*,) ](*,) ](*,)
0
Comments
What client are you printing from? Classic?
How are you giving the command to print? From a button on the main (header) form? If yes, it should update without any additional programming.
If you do it any different, you may need to call CurrForm.UPDATE on the form that shows the header.
If you print it in a way that is not related to the form showing the header, say from the menu pane, then best just forget it.
I am printing the pdf from Functions->Print-> Print Pdf.
On Print Pdf's-> OnPush-> i call a codeunit which creates the pdf and stores it to C:/ Prints folder.
i tried updating the status from report, by getting the record and validating the record, its working ....But the problem is, it is not updating at the same time after printing the pdf,
i escape the main form after printing the pdf, and then i see the updated status on sales order list.
But it must update at the same time, i used the Currform.Update(false), on the Sales Header's Status to update the mainform..
But No LUCK :-k
Try adding the following line after the call to your Codeunit: