Acumatica reports "Invalid column names from JAMS tables" error - acumatica

We have Manufacturing package version "MFG - 19.102.0051.25 - 2019.05.06" published in our instance. Along with this we have our own customization package. We recently developed a process screen which brings in data from ARRegister and ARTran tables. We also have some custom fields created in ARTran table, on process button action we are doing some calculations and storing values in custom fields of ARTran table.
We are not using any Manufacturing related fields in this process screen. The issue is when do process the records we are getting error saying Invalid column names from JAMS tables. What might cause this issue? See the attached screenshot:
https://i.imgur.com/Q27uhNf.png

I have dirty hack for you to use.
I'd suggest you to create columns, for lack of which code complains and execute your process again.
Overall it could be that some package has dependency from that fields, or may have in the future.

Related

Tabular Cube - Excel Filtering Doesn't Function At Node Level

I have the issue described in this post. I have two cubes with the same data backing them, one a Multi-Dimensional cube, the second a Tabular cube. If I connect to the cubes with excel and drag the top level of a hierarchy(in this example "Company" into my filter category in the Multi-Dimensional cube, then enter some text in the search bar in excel:
(Hierarchy - In Excel)
(Hierarchy - In Visual Studio)
(MultiDimensional - In Excel as a filter)
The level below will be filtered by the text and the results will be returned. However if I filter the same hierarchy in the tabular cube, the results are different:
(Tabular - In Excel as a filter)
I receive no results, the search doesn't appear to function correctly. I can get it to work if I'm looking at the leaf level of the hierarchy, but it appears as though the node level of the hierarchy search feature for tabular cubes in excel doesn't work.
Has anyone else experienced this issue before, I'd love to post the model of the cube but it's rather proprietary, I have experienced the same issue in multiple types of proprietary cubes on multiple servers and clients. Is this some sort of configuration in the model I can change? Or something in excel I can change?
Update 1
I've been doing a bit more digging, I setup SQL Profiler to run against my SSAS server while I performed the search, seems it's generating a MDX query(this time on my "item" hierarchy):
WITH MEMBER [Measures].cChildren As 'AddCalculatedMembers([Item].[I1 - Category].currentmember.children).count'
Set FilteredMembers As 'Head (Filter(AddCalculatedMembers([Item].[I1 - Category].[Category].Members), InStr(1, [Item].[I1 - Category].currentmember.member_caption, "Per")>0),10001)'
Select {[Measures].cChildren} on ROWS,
Hierarchize(Generate(FilteredMembers, Ascendants([Item].[I1 - Category].currentmember))) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,
MEMBER_TYPE ON COLUMNS FROM [XXX_Test_TabularPro]
But it appears to be erroring out (would explain why I'm not getting any results in excel) when run against my cube:
Either you do not have permission to access the specified member, or
the specified member does not exist.
It's a interesting error message, I've actually never seen it before, and there's not much on the internet about it, just a few dead ends. I'm quite sure I don't have a permission issue, I can reproduce the error by running the query as an admin on that server. I think it's related to something in the query or the format of the cube but I'm not quite sure which is the issue, and I'm not super familiar with MDX. Has anybody seen this before? Is there something I can change with the cube to not have this occur? Is it a syntax issue with the query, if so why would excel generate an invalid query?
Another interesting item of note, I noticed that the search function for a leaf level hierarchy works in excel(as noted above) so I swapped out "I1 - Item Category" for "IA - Item Name" and the query runs without issue (of course we're now searching the leaf level), it's something about running this query on a non-leaf level in this case "I1 - Item Category" that is causing this error to occur.
Update 2
Ok I've made a bit of a breakthrough, I've altered my query to see if any combination of input would allow it to work, and I've found one, if I change my filter from "Per" to "GL" I get a result, it turns out that the query outlined above is actually NOT returning results from "I1 - Item Category", it's actually returning results from "[Item].[IA - Item Name].Members" which contains a distinct list of item name's.
I can actually demonstrate this in excel as well:
This makes no sense what so ever, nowhere in my query shown above(the query generated from excels search) do I mention the item name, and you clearly see what "[Item].[I1 - Category].[Category].Members" should be returning in the screenshots above(and what is returned by the multidimensional cube), it just doesn't in tabular, worst of all I captured(with SQL profiler) the query from excel on searching the item hierarchy of both my identical tabular and multidimensional versions of my cube and they generate the same exact MDX query with the only difference being the name of the cube.
I'm forced to come to the conclusion that if one generates two identical cubes(identical as possible), one being tabular, the other multidimensional, and run the above query on them(assuming this hierarchy exists), they return different results, and tabular one will return incorrect results.
Has anyone seen this issue before? I feel the tabular cube is returning a incorrect record set for the specified MDX, how would this occur, is there anything I could do to modify the query or cube to resolve this issue?
Update 3
The saga continues, one of the core questions I'd like to answer here is: Is this something specific to the cubes I generate, or does it affect all cubes, I believe I have the answer to this...
Steps To Reproduce:
Open Visual Studio, New Project, Select "Analysis Services Tabular Project", Next, Create, (A popup will display "Tabular Model Designer" I selected "Workspace Server" point it at my tabular cube server and set compatibility model 1200)
Add the following data to a CSV file or by putting it in a SQL table:
Category_Description Sub Category_Description LeafName
Professional 10 Series Filter
Performance 10 TTR GL
Professional 10 Series Series 1
Unassigned Unassigned AUTOMOTIVE
Performance 500 S RACING
Right click on "Data Sources" select "Import from Data Source", navigate through the menus to import the data source defined above.
As part of item 3 you should've imported the table listed in step 2, you should see this in your tables the new table from your data source:
Open your new table and create the following hierarchy:
Right click on your "TabularProject" in VS, select "Analyze in Excel", this should bring up a excel window
Pull the "Hierarchy1" hierarchy into "Filters", drop down this hierarchy in excel and attempt to search for "Per": You'll see that no results are displayed.
IMPORTANT Note: If I change the workspace to "Integrated", rebuild and process the cube, I no longer see the bug, it must be related to how the server is processing this model, in someway it must be different then how VS does it locally.
Ok, I think I finally understand what is occurring here, I checked my SSAS version number:
15.0.32.55
This is quite old, so I updated to "15.0.35.15" and it appears as though the issue is now resolved(search in excel now works), I believe this version upgrade introduced a fix that resolves this bug, most likely either this one, or this one.
I tested this with a slightly different environment. I used Power BI to build the model and there, it works like a charm.
I uploaded the model then to SSAS and tested again and it still works out for me. I am SQL 2019 an Power BI.
Finally, I tested with VS 2019 native developed model and workspace server. Also, this works out without any problem.

Strange Behavior when saving customer with deletedatabaserecord=1

This issue brothers me for a long time.
I have two environments. 1 for development, 1 for production.
I did the same steps as below:
1, Create a new customer named "TESTID"
2, Delete the "TESTID" after creation immediately. At this time, it would be marked deleteddatabaserecord =1 in BAccount table.
Now, here comes huge different. If I recreated the "TESTID" in my development environment, the system allows and just update the deleteddatabaserecord to 0 and other fields updated according to new input. However, the production environment won't allow to created the customer "TESTID", says "Can not insert duplicated line into object "dbo.BAccount" with unique index. The duplicated key is (2,TESTID)"
This issue also happens to other entities, such as Stock Item. So is there a switch or specific setting?I would be really appreciated if somebody could give me the right direction.
The error says you can't insert entity into the table because of unique index constraint. And you don't have such error in another environment. I'd started investigating from checking if indexes are the same for dbo.BAccount table in either of the environments.

Generic Inquiry as Primary List/Entry Point

As I build custom entry screens for our business requirements, an objective is to utilize generic inquiries as the entry point for a consistent user experience with the rest of the system. I have 3 user entry screens, each of which is on the Site Map in the same place. Two of the GI's allow me to select the Site Map node for these user screens and assign the Entry Point to display the GI instead of the user entry screen. One does not. All of them appear to have very similar DAC structure as well as Graph structure including naming the primary graph in the DAC.
What causes the site map node to be available (or not) for assignment of the GI as an entry point. (For instance, is there an orphaned record I might seek out in SQL from deleting a previous attempt?)
I am on Acumatica ERP 2018R1 (Build 18.113.0018).
There were a couple of issues that prevented the Generic Inquiry from allowing it to be set as an Entry Point. If you have this same issue, review the related DAC's carefully for errors that may not be compile time issues. Also, double check all of the definition tabs in the generic inquiry for fields that you renamed or dropped but failed to adjust in the GI. In my case, the last issue resolved that allowed the GI to be turned into an entry screen was a poorly defined parameter.
To troubleshoot, try making the GI very simple. If you cannot reach the screen to select as the entry point and the GI is very basic, odds are that you have a problem somewhere in the DAC. In some of the DAC's for screens that I could not setup as an entry point, I had reference to a setup DAC that was not using Currrent when it should. This small error in the DAC was the problem on 2 of my 3 screens.
In my case, the primary view name in the graph was not 100% the same as the datamember on the screen. One was camelcase and the other pascal case. Make sure the view name on both the screen and the graph is exactly the same.

Error occurs when creating an overdue charge

I use the framework to create an Overdue Charge. In previous 5.20 version, there is no issue. I upgraded the site to 6.0. Now an error occurs:
Error #115: An error occurred during processing of the field IsRUTROTDeductible : Index was outside the bounds of the array..
I create the ARInvoiceEntry graph. Next the ARInvoice DAC, and populate the header fields. Finally I call graph.Document.Insert(overduecharge). Transactions are inserted later.
I do have some user fields in an extension table 'ARRegisterExtension'. But that table uses the default InnerJoin, with the matching records from ARRegister included in the table
Please advise if an extra step must happen with RUTROTDeductible. I'm not familiar with this entity.
Try to search for RUTROT in your code.
These fields were moved to an extension in 6.0, so these fields will not be available in ARInvoice DAC any more.
If you are setting these fields anywhere, please remove this code.
These fields are for Sweden users only, so, I don't think you need to set it.

How to create a View with replication conflicts

I wish to create a view showing a number of fields from notes documents with replication or save conflicts. So far I have managed to create a basic view with a column for the document ID (Contract ID) then the next column states "Replication or Save Conflicts" but I don't seem to able to either get rid of the replocation or save conflcits column or add new columns to show additional fields from the document. Is there a way I can do this? I want to be able to show the view in XPages. Here is the View selection formula I am using;
SELECT #IsAvailable($Conflict)
Conflicts are not displayed good in views. here are a few alternative tips to deal with conflicts that might give you an idea or two :-)
Create a categorized column with the value of the field $ConflictItems in the view you have, then you will see which item is causing the conflict and can take action to prevent it.
When you open a conflict you can use the action menu "View Parent" to compare the parent and the conflict
Ytra ScanEZ is a great tool for finding and resolving conflicts. it is also possible to create a script that will compare the documents and present a diff list.
You can create an XPage to display your conflicts (and parents). The web is more dynamic as it allow you to layout your data in the way you want and is not restricted to the way view in Notes works. This kind of xpage can be displayed in Notes client or Web browser
Use XPages power. Get all documents from the view with your selection formula. But don't try to show any column value and get fields directly from back-end document you get from view entry entry.getDocument().
Sure, it has some performance impact, but for (hopefully) small amount of replication conflict it's nothing serious.

Resources