this.dsHolder.Attach(ds) with blocks

I’ve got a BPM on SalesOrderUpdate, post processing. I change some rows and then call update again. I get “Row has been modified by another user”. When I search these forms I find that calling GetByID and then this.dsHolder.Attach(ds) is supposed to fix this, but I don’t have the ability to use the custom code block. Is there any way I can call this.dsHolder.Attach(ds) from regular blocks?

You get the “row has been modified by another user” because the SysRevID or timestamp of the record you are trying to work on does not match the one on the database, meaning someone else has made changes.

The fix is to get the latest record before trying to make any more changes.

1 Like

Ah, I need it before AND after my changes it seems like. I didn’t expect that. I only had one GetById in there.

hmm not sure actually, I’m still getting the error message now:

  • Check if BPM was enabled from preprocessing
  • GetByID
  • Update msc charges row
  • Update
  • GetById

Still gives the row modified by another user @Jonathan

Not sure what the Update Table by Query actually does, try replacing that block with something simpler like modifying a single field like a description or date, and see if that triggers the error.

1 Like

No error, but the change doesn’t commit or come through at all.

Maybe you could find a bpm somewhere in the forum that you can import or recreate and see if it works.

I have the exact same thing made for quotes and it works great. I have no idea why the same thing doesn’t work for Orders

1 Like

Are you using MasterUpdate?

No, just update.

1 Like