Update attachment location when moving Requests
Audience:
•
Environment: onsite
Some tooltip text!
• Less than 1 minute to read
• Less than 1 minute to read
If moving Requests and the attachment location has changed, you need to update the last row in attachment_location
to point to the new path, for example:
USE [SuperOffice]
GO
DECLARE @path varchar(199)
SET @path = 'E:\SuperOffice\SO_CS\attachments'
UPDATE [crm8].[ATTACHMENT_LOCATION]
SET [path] = @path
,[updated] = getdate()
,[updatedCount] = updatedCount+1
WHERE attachment_location_id = (select max(attachment_location_id) from crm8.ATTACHMENT_LOCATION)
See also how to split location.