I'm having an incredibly hard time with this script.
Will this fix my problem where I'm getting JS errors:
TypeError: Cannot read property 'parameters' of undefined
#2
http://www.mysite.com/Resources/Share...#1
http://www.mysite.com/Resources/Share... TypeError: Cannot read property 'length' of undefined
#8
http://www.mysite.com/Resources/Share...#7
http://www.mysite.com/Resources/Share... Function.TreeNodeConverter.castNode()
#6
http://www.mysite.com/Resources/Share... DynamicTreeViewController._onGetTree()
#5
http://www.mysite.com/Resources/libra... Object.proxy [as success]()
#4
http://www.mysite.com/Resources/libra... fire()
#3
http://www.mysite.com/Resources/libra... Object.self.fireWith [as resolveWith]()
#2
http://www.mysite.com/Resources/libra... done()
#1
http://www.mysite.com/Resources/libra... XMLHttpRequest.callback()&host=
www.mysite.com--------------------------------
Modified script that has errors:
UPDATE dbo.Portals
SET AdministratorRoleId = CASE
WHEN Exists(SELECT * FROM dbo.Roles R WHERE R.PortalID = P.PortalID AND R.RoleName Like 'Admin%')
SELECT MIN(RoleID) FROM dbo.Roles R WHERE R.PortalID = P.PortalID AND R.RoleName Like 'Admin%'
ELSE
SELECT MIN(RoleID) FROM dbo.Roles R WHERE R.PortalID = P.PortalID
END
WHERE AdministratorRoleId Is Null OR AdministratorRoleId != IsNull((SELECT RolelID FROM dbo.Roles R WHERE R.PortalID = P.PortalID AND R.RoleID = P.AdministratorRoleId),-1)
GO
UPDATE dbo.Roles
SET [BillingFrequency] = 'N'
WHERE IsNull([BillingFrequency], '') = '' OR [BillingFrequency] NOT IN ('D', 'M', 'N', 'O', 'W', 'Y')
UPDATE dbo.Roles
SET [TrialFrequency] = 'N'
WHERE IsNull([TrialFrequency], '') = '' OR [TrialFrequency] NOT IN ('D', 'M', 'N', 'O', 'W', 'Y')
UPDATE dbo.Roles
SET [TrialPeriod] = 1
WHERE [TrialPeriod] IS Null
UPDATE dbo.Roles
SET [BillingPeriod] = 1
WHERE [BillingPeriod] IS Null
UPDATE dbo.Roles
SET [ServiceFee] = 0
WHERE [ServiceFee] IS Null
UPDATE dbo.Roles
SET [TrialFee] = 0
WHERE [TrialFee] IS Null
GO