Mass Update of Marked Lines in Sales Line Subform

jversusjjversusj Member Posts: 489
Hello all,
We have some POs with many lines. On occassion, the planned shipment date needs to be changed for large groups of these items (hundreds of lines). The Order Entry department would like to be able to manage the update directly from the sales orders, but automate the line-by-line processing (enter the date once and have it update all impacted lines).

They are already familiar with marking records and running routines against marked record sets. I approached this the same way, let them mark the lines that need the update (1 - X number of lines). Then, give them a button click to pass this MarkedOnly record set to an update routine. The button is on the sales form and the OnPush points to a function in the subform (sales lines).

I created a processing report and passed the Marked record set as a table view. The RUNMODAL command lets the user enter the date to update on the request form and the click of OK updates the lines. This works perfectly when the record set is 1 line. As soon as I add a second line, I get a "do you want to rename the record' pop-up when the report completes and focus returns to the sales order form.

This seems to have to do with the form triggers being called and grabbing the right subform records, but i cannot find a way around it (the debugger will not stop on the message). Clicking no on the rename allows the update to occur, but the rename pop-up is not desirable for the end-user (clicking yes throws an error that the line cannot be renamed, but again the update persists). Therefore, there is no harm in the pop-up, besides the obvious shortcomings of my design (giving the user a pointless click) and bad UI.

I then experimented with adding a field on the sub-form for keying in the new data parameter. The button click then uses this parameter to update the marked lines (no processing report called) and all the lines are updated (with no pop-up). i do not like this approach since it isn't very "navision-like."

now my question.
1. why might i be getting the rename prompt when attempting to update more than 1 line with my processing report? In the case of updating 1 or more lines, i am still taking the focus from the sales order form and passing it to a report. I then pass the focus back - so i would think the same form triggers would be called. I would then expect the rename prompt for multi-line and single line, yet only receive the rename for multi-line data sets.
2. any tips for how I can resolve this in a manner that follows standard NAV design.
kind of fell into this...

Answers

  • kapamaroukapamarou Member Posts: 1,152
    Have you tried adding a CurrForm.UPDATE(FALSE) after the Report.RUNMODAL exits?
  • jversusjjversusj Member Posts: 489
    kapamarou wrote:
    Have you tried adding a CurrForm.UPDATE(FALSE) after the Report.RUNMODAL exits?

    :oops:

    I had typed it as CurrForm.UPDATE, leaving off the parameter False. I added false and ran the routine and it worked. Thank you so much!
    =D>
    kind of fell into this...
  • kapamaroukapamarou Member Posts: 1,152
    You're welcome! :D
Sign In or Register to comment.