Strange Behavior when saving customer with deletedatabaserecord=1 - acumatica

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.

Related

Acumatica reports "Invalid column names from JAMS tables" error

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.

PXFormula and SumCalc not calculating correctly (doubling value of field)

Where does the code that makes a PX Formula work exist? I at first assumed it was a SQL Trigger, but I can't seem to find it there. This is why I ask....
I've added a custom field to the SO, called usrSpeedyTotalExt2. I'm trying to get that to sum the SOLine.CuryLineAmt. I added attributes to the SOLine DAC to append the follwing:
[PXFormula(null, typeof(SumCalc<SOOrderExt.usrSpeedyTotalExt2>))]
This seemed to work, but know I'm fining that the value is consistently twice as high as it should be. I've got a second field that's doing the exact same thing.
What's increasingly odd is that I had the same problem with the field, and I thought I had done something wrong so I deleted the PXFormula, created a new field and then added the PX Formula to populate the new field. As such, there shouldn't be any code populating the old field, but strangely it's populated, so there must b e some business logic that's stuck and somehow still populating it.
Any thoughts on how I track this down?
I believe that I figured out the problem...I think that the code may have been imported and published on more than one company, then published from the proper company to multiple tenants.
My fix was to go to the live company, un-publish all, then go back to the company the customizations live in and publish to the appropriate tenants. It would appear that now I'm only getting the proper totals. IDK how that might have happened, but at least it appears to be fixed.

how to delete workorders in maximo

In maximo, can we delete a work order? The select action menu gives me
BMXAA4612E - Cannot delete because it is, or had at one time been approved.
I have created numerous test work orders and it is getting difficult to track new work orders.
Short Answer: You can't.
Standard Maximo will not let you delete it past a certain point. It keeps this data around for a sort of auditing (and because there could be a lot of dependencies to undo).
Bad Answer: With some database queries. You can of course delete about anything if you start modifying Maximo's underlying database directly. The Work Order object has a number of related tables though, so make sure you delete all referenced data from those as well. And there might be other places you need to update too, like a PM due date, depending on the situation.
In a normal Maximo environment, it is very common to have a lot of open work orders at any given time. You are going to need to develop ways to handle the fluff. Closing your old test work orders helps, because Maximo filters out closed work orders by default. Standard filters with some specialized data and saved queries are some other options.
Clear attribute: FIRSTAPPRSTATUS
update woactivity set FIRSTAPPRSTATUS = null
where ;
Then deleting should be possible
--> However it is not (in maximo 7.6)
For Maximo 7.6, change the workorder status to WAPPR from the backend or through MIF and then use MIF to delete the record(s)
I created an action that executes set FIRSAPPRSTATUS null and created an escalation with the condition of selecting a work order. After the escalation is completed, deletion will be available if the remaining conditions for deleting the work order are met.

Deployment type-code changed from Reserved Hybris to Non-reserved codes. Do I need Update or Initialize the whole system?

I used some of the Hybris reserved Deployment code and then later changed to non-reserved deployment type codes. Do I need to Initialize the system in-order to reflect the changes with new deployment code or just an Update works. There are many items that deployment code has been changed. Why update doesn't work?
When you use a reserved code in your deployment table, you're likely to add the attributes of your object in an existing table. If you have attributes with the same name, it'll surely be a mess in the table (I don't know how hybris will choose the table type for example).
When you run an update with the good deployment code, it will create a new table which is just fine. The other table which has been used by two objects will still remain potentially broken because hybris won't delete any column.
That's why you should initialize your system to have a clean DB. The issue is that you'll lose all your data.
If you need to migrate data it will be probably quite hard because you must have to look on the broken table and distinguish between the attributes that should not be there and the others. So I hope for you that it's just a dev issue!
Actually i would suggest you to do initialize rather than update more likely that the update will not work for you in this case and probably you will get some error messages saying invalid pk xxxxxxxxxxxx because of unknown typecode yyyy.
As you may know the typeCode (deployment code) is an essential operator for the generation process of PKs in Hybris and thanks to it Hybris can ensure the uniquenessity of the PKs, so even if you change the old typeCode with a new one it's very likely that Hybris will still keep the old typeCode somewhere hence PKs already generated will never be consistent with the new typeCode.
So that's why you should never change the typecode of an item once given.
My suggestion is :
To make a backup of your existing data (you can export it from HMC,
you may take a look at alain.janinm's answer here).
Then initialize your System.
Then re-import the data again.
Note : that typecodes between 0 and 10000 are already reserved for hybris
particular items.

resetting "Issue ID" in Sharepoint site

I designed a site in share point. There is a column called "Issue ID (linked to item)" in ALL Issues view. I am using this column to list and identify the items which are created by employees. It increases by 1 as a new issue is created. Unfortunately, I have to reset this ID to 1 because during the test period I created and deleted blank issues. Although they were deleted, the share point increasing Issue ID from the last deleted issue (89).
Is there an easy way to do this? how can I reset this auto number? I need to reset this counter as soon as possible without any risk...
Do you kindly help me? I would be glad if you explain it in detail.
Thank you,
If your Issues list wasn't heavily customized and nor referenced by GUID in any custom code, the simplest and most supported option would be to recreate it with the same name after deletion as a customized template you could have saved without contents from list settings page before deleting or as a standard Issues list.

Resources