10.2.300.8 Row Has Been Modified

Yes, some are Post Processing, actually. One of the Post is an BPM for the Sales Order, SHipTo, OrderJobWiz,and Job Entry.

For a bit more indepth information. This error happens when the SysRevID in the loaded record doesn’t match the SysRevID in the Database. That is when the record on the screen is “older” than the record in the DB.
When a change is made to the record, the SysRevID field is automatically updated and this is compared before an Update() with the existing record on the screen. If these values do not match that means that something or someone updated that record and didn’t refresh the screen.
This typically happens on a BPM or Data Directive which runs in Post Processing, becasue the record changes and that change isn’t propagated to the screen properly.

It can also happen if you have Updatable Dashboards which modify or touch one of these records. You can be in the Order with a record loaded and someone / somewhere else will uddate that record via the UBAQ and modify your RevID.

3 Likes

Anything that Runs in Post Processing and modifies a record, needs to make sure that the record being returned in the ttTable is also updated to the “right” version.
This is usually done by running GetByID() after the code has ran, to “refresh” the ttRecord.

1 Like

Gotcha. So is there a way to stop this from happening, or is this just the cost of customization?

You need to refresh your record after the post processing BPM happens. For example if you have a Post Processing BPM on SalesOrder.Update() which changes the value of say a field in order head… your Workflow should look something like this

PostProcessing BPM
Update Record
Run Get By ID on SalesOrder to Refresh ttRecord before it is sent back to the screen

here is an example of how to do that, for a Quote but the same principle applies

1 Like

Epicor makes use of Entity Framework and MS SQL ROWNUM Column. We use the same in our Custom Applications… What if 2 Clients connect to X Database and both people modify the same record… Well who ever hits save first wins, the other person - has to refresh and retry.

Entity Framework can handle the lookup by itself and throw an Exception.

It doesnt matter who updates the record… Even i I were to do Direct SQL UPDATE the ROWNUM will increment (change) (SysRevID) and then when your User tries to save, it will say “you simply have an old record, cant do it!”

2 Likes

we are on 10.2.300.8 and have not seen this.

I always thought it was when you try to do something that someone else may have touched first or when I was doing stuff just got out of sync and clicked refresh…at least in past experience.

1 Like

Ok, so in the customization I need to add code to refresh the record, correct?

no in the BPM

1 Like

@Will79 - There were some issues with this when viewing verify results in Customization Maintenance.

I’m seeing it often in our 10.2.xxx.x testing… Not sure if it’s been fixed. Feel free to pop in an EpicCare case assigned to Technical. They’ll explain it better than I could.

2 Likes

I was hoping you would say that. SO I have a Psot MEthod Directive on Erp.SalesOrder. Here is a pic of it.

Where do I add in the GetByID() at?

@josecgomez Thank you for the info! I played around with it and figured out where to put it. I’ve only done 1 BPM in the past 1.5 years and only 1 customization that had code. So, not very much experience. My last question is, I see where you are using Erp.Contracts.etc for the the example you told me to view. Where can I find that info for other fields like Update or Job entry screen BPM? Hope this makes sense. I am trying to figure out where to find the info and what each named piece you have represents so I can replicate as I need too.

The Erp.Contracts.XXX is in the DLL for each of the business Objects
image

And the format is always Erp.Contracts.SvcContract
or if its an Ice framework Contract it would be
Ice.ContractsSvcContract

Ok, so using the format i saw in the post you provided, and editing it for the update to SalesOrder that I have that is Post Proc, how bad am I off here:

using(Erp.Contracts.SalesOrderSvcContract quoteSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.SalesOrderSvcContract>(Db))
{
 OrderHedTableset OrderHedDs = SalesOrderSvc.GetByID(OrderNum);
 this.dsHolder.Attach(OrderHedDs);
}

That’s pretty good, right on the money I’d say. Make sure you only do this IF there was a change to the data (Db) in the post processing

How would i word/code that in?

@josecgomez So I put that code into the BPM and had it check the Syntax. Her are the three errors I am getting:

  1. The type or namespace name ‘OrderHedTableset’ could not be found (are you missing a using directive or an assembly reference?)
  2. The name ‘SalesOrderSvc’ does not exist in the current context
  3. The name ‘OrderNum’ does not exist in the current context

Found one error and fixed it to this:

using(Erp.Contracts.SalesOrderSvcContract SalesOrderSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.SalesOrderSvcContract>(Db))
{
OrderHedTableset OrderHedDs = SalesOrderSvc.GetByID(OrderNum);
this.dsHolder.Attach(OrderHedDs);
}

So 1 and 3 are left.

It would be SalesOrderTableset not OrderHedTableset

and OrderNum you’ll have to find… or pull from somewhere it doesn’t just exist without being declared. So you’ll have to find that OrderNum from… your record?