SQL Scripts for Microsoft Dynamics GP: Copy Workflow from Source to Destination Database

Microsoft Dynamics GPThis script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posting the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.

This script will copy the workflow setup from a source database to a destination one. It was created for a client who did testing of workflow in one database and then wanted to deploy the changes across a couple of dozen more.

The highlighed databases are the source database which you will need to amend and run the script in the destination.

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
--UPDATE SETUP IF EXISTS UPDATE DESTWF SET EnableWFNotifService = SRCWF.EnableWFNotifService ,Web_Service_Server = SRCWF.Web_Service_Server ,Web_Service_Server_Port = SRCWF.Web_Service_Server_Port ,Web_Service_Server_SSL = SRCWF.Web_Service_Server_SSL ,Enable_Workflow_Email = SRCWF.Enable_Workflow_Email ,EMail = SRCWF.EMail ,DSPLNAME = SRCWF.DSPLNAME ,SERVERID = SRCWF.SERVERID ,Server_Port = SRCWF.Server_Port ,IsSSL = SRCWF.IsSSL ,SMTP_Authentication = SRCWF.SMTP_Authentication ,SMTP_User = SRCWF.SMTP_User ,SMTP_Password = SRCWF.SMTP_Password FROM WF00100 AS DESTWF --Workflow Setup (WF00100) INNER JOIN TWO..WF00100 AS SRCWF ON SRCWF.SETUPKEY = DESTWF.SETUPKEY WHERE DESTWF.SETUPKEY = 0 GO --INSERT SETUP IF NOT EXISTS INSERT WF00100 SELECT SETUPKEY ,EnableWFNotifService ,Web_Service_Server ,Web_Service_Server_Port ,Web_Service_Server_SSL ,Enable_Workflow_Email ,EMail ,DSPLNAME ,SERVERID ,Server_Port ,IsSSL ,SMTP_Authentication ,SMTP_User ,SMTP_Password FROM TWO..WF00100 AS ['Workflow Setup'] WHERE (SELECT COUNT(*) FROM WF00100 WHERE SETUPKEY = 0) = 0 GO

Click to show/hide the SQL Scripts for Microsoft Dynamics GP Series Index

SQL Scripts for Microsoft Dynamics GP
Verify PM Batches Exist
Update Accrued Purchases Distribution on History Receipts from Posting Account Setup
Insert Mfg BOMs from Text File
SQL Function To Return Approver
List of Active Fixed Assets
Insert Manufacturing Routings from Text File
Table Function to Split String on Delimiter
List of Open Payables Transactions
Insert Creditor Item Numbers
Return Top Level BOM for Manufacturing Orders
Custom Purchase Order Email Notification to Originator on Workflow Final Approval
list of Open Payables Distributions
Set New Vendor On Hold if EFT Exists
Set New Vendor On Hold if EFT Exists
Payment Run Apply Query
List GL Transactions
Simple RMA Audit
Change Vendor Change Approvals Joins and Fields
Insert National Accounts from CSV
List GL Accounts With Notes
Import Site Bins From CSV
Remove Multicurrency from Sales Transactions
Change Email Notification Assignment
List General Ledger Transactions (Excluding Year End Journals)
List Taxes Linked to GL Accounts
Allow Workflow Originator to be an Approver
Add Joins and Fields to PM Document Approval Notification Emails
Update Accounts and Distributions on Work Status Sales Transactions from Item Card, Tax Details or Posting Account Setup
Upload and Verify Tax Commodity Codes
Delete Corrupt Extended Pricing Data
Assign All Items to All Site Bins
Sales Transactions (Work) Against a Specific Site
Change Web Service URi
SQL View to Return Quantity Available
Verify Tax Detail Assigned to Vendor
Insert Extended Pricing Price Sheet Header
Prefix Companies Names with System Designator
SQL View to Return Category Linked to Segment 3 in COA
Update Site Descriptions From CSV
Copy Workflow from Source to Destination Database
Extract GL Period Balances
Sales by Customer By Year
Purchased Items With Serial Numbers and Linked Sales Transactions
SQL View to Return Purchase Orders
Select All Primary Keys and Generate ALTER Script
Copy Workflow Calendar from Source to Destination Database
SQL Trigger on PO invoice Insert to Change GL posted Date
Sales by Salesperson By Year
Script to Set Transactions as Included on VAT Daybook Return
SQL Script to Return PO Receipts
Insert Extended Pricing Price Sheet UofM Work
View for Payables Transactions Extract
Export Open/History PM Transactions After a Specified Date
Copy Email Messages from a Source to Destination Database
PO Receipt History View
Insert Extended Pricing Price Sheet Assignments
Extract Payables Transactions from All Companies
List Open Purchase Orders
SQL View to Create Division Tree for Management Reporter
Select Chart of Accounts
Activate Horizontal Scroll Bars for All Existing Users
Workflow Assignment Review
Update Item Replenishment Method for Manufacturing
Get Alpha Characters from an Alphanumeric String
Set Vendor On Hold If EFT Details Changed
List Open Purchase Order Lines
SQL View to Create Division, including UDF 3 and 4, Tree for Management Reporter
Delete Orphaned Vendor EFT Details
Sales Invoice Query
Round Extended Pricing Price Sheet Item Value
Get Numeric Characters from an Alphanumeric String
Trigger to Activate Horizontal Scroll Bars for New Users
View to Return List of Payments and Linked Invoices
Select Duplicate Extended Pricing Price Sheet Work Records
RM Aged Debt Report
Select Next Temporary Creditor ID
Select a List of Vendor Addresses
Set Vendor On Hold When Created
Assembly Transaction Quantities Required
Generate Standard Cost Update Macro from Text File Import
Check for Corrupt Extended Pricing Records
Sales Line Items
Compare Ship To Address on Work Sales Trx Against Customer
SQL View to Return PO Commitment Detail
List Bank Accounts with Linked GL Accounts
Validate and Insert/Update Vendor Emails from a Text File
Return Items with Incorrect Quantities
Set Account Categories To User-Defined Field 2
Check Posting Type for Account (Segment 2)/Account Category Combinations
Update Ship To Name on Work Sales Transactions to Match the Customer Name
List Tax Detail Transactions
Select Tax Details and Related G/L Accounts
Update Account Description by Adding 3rd Segment Description
Update Segment Descriptions from Other Database
Return Opening Balance for Period of Supplied Date
Update Min Order Qty and Average Lead Time on Vendor Item From Text File
List of PM Invoices for Vendors with POs
Select Debit, Credit and Net Change for All Accounts in Date Range
Select All Pending Prepayments
Available Stock for All Items
Item Report
Migrate Vendor Emails from Active Docs to Standard Email Fields
Update Mfg Cost Accounts from Mfg Item Class Setup
PO Commitment Detail
Update Inventory Accounts from Item Class
Create Macro to Delete Items
Update Accounts Payable Distribution on Work Status PM Transactions from Posting Account Setup
Update Item Resource Planning on Item Quantity Master from Text File
SQL View to Return List of Posted Vendor Document Numbers
Update Inventory Distribution on Work Status Purchase Orders from the Item Card
Update Item Engineering File from a Text File
List of Exchange Rates

New Book on Jet Reports with Microsoft Dynamics 365 Business Central Available

Microsoft Dynamics 365 Business CentralI have a new book available now called Jet Reports with Microsoft Dynamics 365 Business Central; this book is aimed at end-users or consultants looking to use Jet Reports with Microsoft Dynamics 365 Business Central for financial and/or operational reporting.

The book covers the basics of installing and configuring Jet Reports as well as how to design and build reports using the Excel Add-in, before moving on to step-by-step guides on creating six different types of report and closing with a look at the report building tools, Jet Hub and report distribution.

Jet Reports with Microsoft Dynamics 365 Business Central by Ian Grieve

The book is available as an eBook direct from my azurecurve Publishing site (always with a discount of $5, but this month with an additional discount of 15% using voucher code JulyWithBCJuly) or from Amazon:

The book is structured into these chapters:

  • Chapter 1, Introduction to Jet Reports, introduces Jet Reports and explains what type of reporting for which it can be used.
  • Chapter 2, Implementing Jet Reports, covers the installation of Jet Reports including the Jet Service Tier and Jet Hub.
  • Chapter 3, Configuring Jet Reports, shows how to configure Jet Reports once it has been installed.
  • Chapter 4, Introducing the Excel Add-in, introduces the Excel Add-in and the features available.
  • Chapter 5, Report Structure, shows how reports can be structured to make maintaining them easier.
  • Chapter 6, Using the functions in the Excel Add-in, shows how each of the four Jet Functions can be used.
  • Chapter 7, Creating and using an Options page, covers the creation and use of an options page in reports.
  • Chapter 8, Create a Summary Trial Balance, steps through the creation of a Summary Trial Balance report.
  • Chapter 9, Create a Detailed Trial Balance, shows how to make the Summary TB from the previous chapter into a Detailed report.
  • Chapter 10, Create a Balance Sheet, covers the creation of a formatted Balance Sheet.
  • Chapter 11, Create an Income Statement, covers the creation of an Income Statement and how to make it an intercompany/consolidated version.
  • Chapter 12, Create a Summary Payables Aged Trial Balance, shows how to create a Summary Payables Trial Balance report.
  • Chapter 13, Create a Sales Invoice by Customer Report, covers the creation of an operational report on sales invoices.
  • Chapter 14, Report Creation Tools, introduces the tools which can be used to make creating reports easier.
  • Chapter 15, Using Jet Hub, shows how users can access Jet Reports via web access and without a local install of Jet Reports.
  • Chapter 16, Report Distribution, shows how users can schedule or generate reports into Microsoft Word.

If you buy the ebook from me directly, the coupon code JetWithBCJuly will get you 15% off the price of this book (offer available until the end of July 2023).