Tuesday 16 August 2016

A save operation on table PM_Transaction_Open has created a duplicate key

So you post a batch and it gets stuck in batch recovery. Try to clear it and it cannot come out. When you click 'more details' on the error it tells you about the save operation creating a duplicate key.

What to do?

Backup company and system database and then run checklinks on the Payables Logical and Vendor tables. Run this twice and the keys will be recreated, you may have to delete the batch after if the transaction was posted and resulted in an extra record.

Monday 15 August 2016

Dynamics GP - Sales Order has been removed

So you tried saving a sales document, lost connection, forced to exit the system. Sign back in and cannot access the document.

Do an item inquiry and see the stock allocated.

What next?

In this order:
Run Checklinks on Sales Work
Run Reconcile on Inventory for the specific item.

Then run both a second time, the first time the sales order will correct itself, the second time the stock will be corrected. So yes, you have to run checklinks on sales work, then inventory reconcile then checklinks on sales work and then inventory reconcile again, in this order.

Smartconnect - Collection could not be initialized

So you get the above error and a long string of the fields used in the integration when you try to save the map you created.

To Resolve, export all setups from smartconnect.
Uninistall Smartconnect
Reinstall and 'run as admin'.

All will be fine now.
Trust me ;)

Thursday 11 August 2016

Import Segment Descriptions Dynamics GP

Ok so you have this long listing of segment numbers and segment descriptions to update to your financial setup and dont know how to begin.

You can either use the import method suggested by azurecurve or follow the mailmerge method below. 

What you need:
1. Spreadsheet data source with columns -  segment_number (the segment position in the chart - segment 2 or 3 for example); segment_value (the segment value within the chart so if it is revenue the number may be 4000 for example); and segment_description.
2. Word merge template
3. End result - SQL Statement

The Word mail merge template will use the spreadsheet as the data source for the mail merge.  In this scenario we have a single statement:
update gl40200 set dscriptn = '«segment_description»' where sgmtnumb = '«segment_number»' and sgmntid = '«segment_value»'
The resulting merged data could then be saved as a SQL query and run against the relevant company database.  Note that it is best practice to validate database updates in a test environment and to have a current database backup in place before running update statements.  Given those warnings, here are the first four lines from a set of sample data:

update gl40200 set dscriptn = 'SC Contracted' where sgmtnumb = '2' and sgmntid = '101'
update gl40200 set dscriptn = 'SC I/H Janitorial' where sgmtnumb = '2' and sgmntid = '102'
update gl40200 set dscriptn = 'SC I/H Janitorial Misc' where sgmtnumb = '2' and sgmntid = '103'
update gl40200 set dscriptn = 'SC I/H HVAC Service' where sgmtnumb = '2' and sgmntid = '104'