How can I access the XaSyst table record in code?

I looked into the adapters list and I could not find it … sorry …

I added UD field (Route_c) for a counter I need to increment in code. Tought of using that table instead of a UD table… :thinking:

What would be proper syntax to access ?



Use the AutoIncrement functions built in to Epicor.

Works great and you don’t have to maintain it yourself.

Thanks Jose

question in the example I assume the following:
“NextJobNumber” is the name of the field. What table does it access ?
Calling this function “creates the counter for you” ? if so that is a nice feature!

If I need to create a new one, company wide access…

I would call the function this way?  
string KeyNextRoute = "KeyNextRoute";
int NewRoute = 200;
nv.SetCurrentCompanySequence(MyCompany, KeyNextRoute, NewRoute);

Then to increment:
int NextValue = nv.GetNextCompanySequence(MyCompany, KeyNextRoute);

What is the nv? it was not part of the declaration from the post… unless I missed it…



As well tried to add the reference specified via the reference manager /Add custom reference and it was not available…

Company Specific next values
//Add Reference:
Erp.Internal.Lib.Shared.dll not found
//Add Using:
Using Erp.Internal.Lib;
Using Ice.Common;

Yes it creates a counter for you.
nv is the Next value Class.

Here’s an example

1 Like

And I understood from the post that if it is DB related you call it this way

var nv = new NextValue(Db);
Int CurrentValue =  nv.GetSequenceCurrentValue(Inputs.NextValueKey_chr.Value);

but for a company related sequence I would think it would be different?
var nv = new NextValue(CompanySequence) ???

I am not creating this counter based on New row in a Database… that is why I thought more of using the company sequence way…


1 Like

I just noticed your examples were for BPM’s…where I have access to the dll’s, they are on the server. I was trying to add this in my customization, where the mentionned dll’s are not.

I am updating multiple rows with the same Counter value, then need to increment it. … I will need to think of a way to make all this work.

Thanks for your input.


You can use an Updatable BAQ to get the next sequence (from the BPM side) (same principle)
In your BAQ Bpm get the next sequence value, return it as part of the result set. Then use that in your customization.

1 Like

If you EVER decide to run this transaction outside the UI (REST, Service Connect), the BPM would still work. If that’s desired behavior then cool but if not…

Mark W.

1 Like