Manually generate service workorder

[FORUM NOTE: This issue has been resolved in AyaNova 4.2]

When I am on the Preventive Maintenance page and highlight a PM and click “Manually generate service workorder” a new workorder opens. The error occurs when I goto save the new workorder, I get the following error and AyaNova closes without saving the new workorder.

violation of PRIMARY or UNIQUE KEY constraint “PK__AWORKORDER__587208C1” on table “AWORKORDER”

Any thought to why I am getting this error?

-Tory

Hi Tory

Have not seen this error message before. Please provide the following so that I can recreate:

What version of AyaNova is in use?
By what configuration are you connecting - single user default, Firebird Server, SQL Express or SQL Server?
Does this occur only for this PM or for any PM of yours?
Are you connecting via Data Portal, or WBI?
Provide details on what is in this PM order itself - data from each field that you have filled in so that I can recreate
Provide details on any additional data you enter into the workorder before you go to save it so that I recreate your exact steps

  • Joyce

Joyce,

  1. AyaNova 4.1.5

  2. Firebird Server

  3. Every active PM. I have 4 databases running and this occurs on all 4)

  4. Data Portal, This does not happens if I am logged in as admin on the local server.

  5. Summary, contact, Client Reference #, internal Reference #, Workorder status, workorder category, onsite, close by date, service date, Workorder Items (one entry with summary, notes, status, priority), Unit, Scheduled Users( 2 entries), labor (1 entry).

  6. It does not matter if any additional data is entered. I can not change anything and it still errors.

I have attached a screen shot on one PM I am trying to manually create a workorder for.

-Tory

Hi

I am going to set up and than will post back

  • Joyce

Hi Tory

I am able to recreate that via a dataportal connection if you attempt to save a workorder that was manually generated froma PM, the error Violation of PRIMARY KEY constraint ‘PK__AWORKORDER__114A936A’. Cannot insert duplicate key in object ‘dbo.aWorkorder’ will occur whether using Firebird, SQL Express, or SQL.

I have contacted development and will post back.

  • Joyce

Joyce,

Thank you! I will check back for your solution. It is not a major concern, just a slight inconvenience for my guys in the field.

-Tory

Hi again Tory

At this time, do the following (NOTE: this is ONLY for a user using a dataportal connection wanting to manually generate a workorder):

  1. Have your user that is connecting via data portal connection manually generate the workorder from the PM

  2. But instead of clicking Save, the user is to click on the X in the upper right hand corner

  3. The user will be asked “Do you want to save changes?”

  4. User is to select “No”

  5. Now move to the Service Workorders grid, Refresh the grid,and open the last created workorder’s entry screen as this will be the workorder created from the PM.

What occurs when you manually generate a workorder from a PM, is that internally the workorder is actually created with a placemarker just not normally shown as an actual workorder in case you cancel out. Whereas what is occurring with a dataportal connection, is that the workorder is actually saved already with a workorder number as soon as you manually generate, so when you go to save it, it conflicts with itself because its like it is telling it to save another workorder with the same number.

Thank you for bringing this to our attention. This will be fixed in the next maintenance update.

  • Joyce

Joyce,

I was able to create and find the new workorder. It does not save any changed you make so if you need to do this create it, close it, and then reopen it on the service workorder page, and THEN make your changes! This should get us by until the next update. Thanks for your quick help.

-Tory

Hi again Tory, just wanted to post here that this is now resolved in the AyaNova 4.2 maintenance update.

Refer to the AyaNova Support Forum topic http://forum.ayanova.com/Topic4264-96-1.aspx for steps to update to the latest version 4.2.0.0, and to the AyaNova Support Forum topic http://forum.ayanova.com/Topic4265-96-1.aspx which identifies issues that have been fixed and new features.

  • Joyce