...
Code Block | ||
---|---|---|
| ||
PRINT '------------------------------------------------------------'; PRINT FORMATMESSAGE ('%s - Started "Create PDF Actions for NGLP"',FORMAT(GETDATE(),'MM/dd/yyyy hh:mm:ss tt')); PRINT '------------------------------------------------------------'; INSERT INTO [dbo].[WORKFLOW_STEP_ACTION] ([WORKFLOW_STEP_ACTION_TYPE_ID] ,[WORKFLOW_STEP_ID] ,[NAME] ,[GOTO_STEP_ID] ,[DISPLAY_ORDER] ,[CONTINUE_AFTER_ACTION] ,[BUTTON_CLASS] ,[VISIBILITY] ,[VISIBILITY_COMPARISON_RULE_ID] ,[BUTTON_TEXT] ,[FEEDBACK_MESSAGE] ,[NOTES] ,[REFRESH] ,[STALE_PAGE_MESSAGE] ,[HELP_TEXT] ,[CONFIRMATION_MESSAGE] ,[QUICK_ACTION_ICON] ,[VISIBLE_TO_ROLE_IDS] ,[SHOW_ON_WORKFLOW_POPUP] ,[SHOW_ON_QUICK_ACTION_MENU] ,[VISIBLE_WHEN_WORKFLOW_INCOMPLETE] ,[VISIBLE_WHEN_WORKFLOW_COMPLETE_SUCCESSFUL] ,[VISIBLE_WHEN_WORKFLOW_COMPLETE_UNSUCCESSFUL] ,[VISIBLE_ON_STEP_ACCESS_CURRENT] ,[VISIBLE_ON_STEP_ACCESS_TARGET] ,[ENFORCE_REQUIRED_FIELDS] ,[PDF_TEMPLATE_ID] ,[COMPLETION_BADGE_ACTION] ,[COMPLETION_BADGE_ICON] ,[COMPLETION_BADGE_TOOLTIP]) SELECT DISTINCT [WORKFLOW_STEP_ACTION_TYPE_ID] = 10 ,ws.[WORKFLOW_STEP_ID] ,[NAME] = 'View ' + t.TEMPLATE_NAME ,[GOTO_STEP_ID] = NULL ,[DISPLAY_ORDER] = 1 ,[CONTINUE_AFTER_ACTION] = 1 ,[BUTTON_CLASS] = '' ,[VISIBILITY] = 'CONDITIONALLY' ,[VISIBILITY_COMPARISON_RULE_ID] = NULL ,[BUTTON_TEXT] = 'View ' + t.TEMPLATE_NAME ,[FEEDBACK_MESSAGE] = '' ,[NOTES] = 'Added via Script during NGLP upgrade on ' + cast(CURRENT_TIMESTAMP as VARCHAR(30)) ,[REFRESH] = 'ALWAYS' ,[STALE_PAGE_MESSAGE] = '' ,[HELP_TEXT] = NULL ,[CONFIRMATION_MESSAGE] = NULL ,[QUICK_ACTION_ICON] = 'fa-file-pdf-o' ,[VISIBLE_TO_ROLE_IDS] = '' ,[SHOW_ON_WORKFLOW_POPUP] = 0 ,[SHOW_ON_QUICK_ACTION_MENU] = 1 ,[VISIBLE_WHEN_WORKFLOW_INCOMPLETE] = 0 ,[VISIBLE_WHEN_WORKFLOW_COMPLETE_SUCCESSFUL] = 1 ,[VISIBLE_WHEN_WORKFLOW_COMPLETE_UNSUCCESSFUL] = 0 ,[VISIBLE_ON_STEP_ACCESS_CURRENT] = 0 ,[VISIBLE_ON_STEP_ACCESS_TARGET] = 0 ,[ENFORCE_REQUIRED_FIELDS] = 0 ,[PDF_TEMPLATE_ID] = 6t.PDF_TEMPLATE_ID ,[COMPLETION_BADGE_ACTION] = 'NONE' ,[COMPLETION_BADGE_ICON] = '' ,[COMPLETION_BADGE_TOOLTIP] = '' from ENTITY_TEMPLATE et join PDF_TEMPLATE t on t.PDF_TEMPLATE_ID = et.PDF_TEMPLATE_ID join ENTITY e on e.ENTITY_ID = et.ENTITY_ID and e.ENTITY_TYPE_ID = 2 join WORKFLOW w on w.ENTITY_ID = et.ENTITY_ID join WORKFLOW_STEP ws on ws.WORKFLOW_ID = w.WORKFLOW_ID PRINT FORMATMESSAGE ('Added [%d] WORKFLOW_STEP_ACTION Records to view Completion PDFs',@@ROWCOUNT); delete et from ENTITY_TEMPLATE et join ENTITY e on e.ENTITY_ID = et.ENTITY_ID and e.ENTITY_TYPE_ID = 2 PRINT FORMATMESSAGE ('Deleted [%d] ENTITY_TEMPLATE Records',@@ROWCOUNT); PRINT '------------------------------------------------------------'; PRINT FORMATMESSAGE ('%s - Completed "Create PDF Actions for NGLP"',FORMAT(GETDATE(),'MM/dd/yyyy hh:mm:ss tt')); PRINT '------------------------------------------------------------'; |
...