It compiles and runs without error, but the SyncToPerCon fields just aren’t updating. The bizarre part is that other fields (e.g. CustCnt.NoContact) are updating fine!!
This makes no sense at all to me. I’ve tried many variations of the same code, using BufferCopy and not using BufferCopy, and it’s all behaving the same way.
Since you are using a BO to do the update, there is Epicor side logic firing to determine handling of input. This may not be the correct way to update those particular fields. I would find an out of box module that does update them, and run a trace to see how it does it. Mirror that logic.
me too did a BL tester and based on the trace it uses update and get rows. Didn’t trace the load so it might be getbyid.
Just noticed that I used the BL tester and didn’t set the rowmod and it still worked…
I did a get rows and interesting there are two customer contacts with the same custcnt num, but different ship tos. is it possible that you are updating the customer contact that has no ship to, but you are looking at the other record?
Are you sure you performed a trace on the correct BOs?
I just went into Customer Entry and traced.
a CustCntTableset is being provided from CustCntSvc/GetRows, with whereClauseCustCnt=“CustNum = ‘2’ By Name”
Comparing the output from GetRows to the input from Update, a field and value is added to the “unchanged row”:
rowNumber: 0
Two rows are sent back to CustCntSvc/Update, the changed “unchanged row”, and the changed row gets the updated fields (sync*) = false), rowNumber =0 and RowMod=“U”
GetByID provides the same output as GetRows, so you should be OK there. perhaps the missing rowNumber=0 is the key.
Probably a red herring then, Kinetic is likely popping that value into the dataview that’s being fed to the BO incorrectly, and BO just ignoring it. C# is throwing an error because it’s a typed dataset, it would let you send it if you set it up as a var vs. a typed variable. I also noted that rowNumber was not present in the definition of a CustCntRow.
Try doing this Function using a Widget Function (with code if you need it). I’ve run into at least one set of BOs (Split Jobs) that I’ve replicated via C# code and the functionality was different than I got via Widgets. I didn’t chase down the C# side to see what exactly the difference was, I got it working and moved on.