Send Email Then Delete Order - E-ship Used

SavatageSavatage Member Posts: 7,142
edited 2008-12-10 in Navision Attain
I would like a report that runs thru some "selected" orders - sends a "Sales Confirmation Email"
then deletes the order.

The email is easily sent but I cannot delete the order. Apparently when the email is sent a field
called E-Mail Notification Handled (boolean) is update. So when I go to delete the order it says
"Another user has modified this Sales Header after you have retrieved it from the database"
"Enter your changes again in the updated window, or start the interupped activity again"
"Identification Fields & Values"
Document Type='Order',No.='1234567'
OnAfterGetRecord()
SendNotificationEmail;
DeleteOrder;

SendNotificationEmail()
emailmgt.SendSalesConfirmation("Sales Header",TRUE);

DeleteOrder()
"Sales Header".DELETE;

Anyways around this? I would like to mass notify & delete selected orders that we will not ship. doing 100's one at a time sucks. I guess I could call another report that does the deleting :-k

Comments

Sign In or Register to comment.