Skip to content

Instantly share code, notes, and snippets.

@stephenway
Last active October 1, 2015 14:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenway/2009178 to your computer and use it in GitHub Desktop.
Save stephenway/2009178 to your computer and use it in GitHub Desktop.
SQL DNN Change City

Change City on DNN Quote Forms

First look for the primary office city.

Instructions

  1. Goto the Developer SQL Page.
  2. Paste in the SQL query below.
  3. Change @DomainName and @NewText variables
DECLARE @DomainName varchar(255) = 'name.agencyrevolution.com'
DECLARE @NewText varchar(255) = 'new city name here'

DECLARE @PortalID int
DECLARE @UserId int

SELECT @PortalID = PortalId 
FROM PortalAlias
WHERE HTTPAlias = @DomainName

update ModuleSettings 
set SettingValue = REPLACE(SettingValue,'[City]',@NewText) 
from modulesettings ms2 inner join modules on modules.ModuleID = ms2.ModuleID
where settingname = 'AR_WQ_Headline_Text'
and modules.portalid = @PortalId

Check Run as Script and click the Execute button

Now you will need to clear site cache and increment version.

Portal Cache

  1. Hover over the Mark Menu
  2. Click on Clear portal cache

Site Version

  1. Hover over the Admin Menu
  2. Click on Site Settings
  3. Click on the Advanced Settings tab
  4. Expand the Client Resource Management section
  5. Check the Override Host Settings box
  6. Click the Update button
  7. Click the Increment Site Version link
DECLARE @DomainName varchar(255) = 'name.agencyrevolution.com'
DECLARE @NewText varchar(255) = 'new city name here'
DECLARE @PortalID int
DECLARE @UserId int
SELECT @PortalID = PortalId
FROM PortalAlias
WHERE HTTPAlias = @DomainName
update ModuleSettings
set SettingValue = REPLACE(SettingValue,'[City]',@NewText)
from modulesettings ms2 inner join modules on modules.ModuleID = ms2.ModuleID
where settingname = 'AR_WQ_Headline_Text'
and modules.portalid = @PortalId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment