- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »
Re: Changing the color of the Desktop in different databases
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-24-2009 10:25 AM
The stuff function is probably returning null for the provided args. You will have to do some digging into the different elements to figure out which part needs to be tweaked for your install. Possibly on the release you are on, one of the 2 elements used in the update do not exist in that column value. The query below will help you in figuring it out. Run it for one of the users it is returning a null for and then look at the returned data and figure out at which character the node starts and how long it is and match that up against the query results.
SELECT TOP 1 CAST(DesktopSettings AS VARCHAR(MAX)) FROM tsmUserDesktop WHERE ActualUserID = [TODO Add UserID of Someone With Null Value] SELECT CHARINDEX ('<StartPage', DesktopSettings) AS 'Starting Character of Stuff', CHARINDEX ('<UndockedBusinessDesktop>', DesktopSettings) - CHARINDEX ('<StartPage', DesktopSettings) AS 'No of Characters to be Stuffed' FROM tsmUserDesktop
where clause
Re: Changing the color of the Desktop in different databases
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-06-2009 11:59 AM
Ok, it is working now. That is just beautiful. For those who has to switch back and forth between the 2 test and production environment this is a easy and quick way to determinate what data is being manuipulated.
Thank you for the script! ![]()
Re: Changing the color of the Desktop in different databases
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-07-2010 12:49 PM
Just out of curiosity (and laziness), do you have a script that works on 7.3? ![]()
Re: Changing the color of the Desktop in different databases
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-08-2010 04:38 AM
Not yet, on my TODO list. I will post it back here when I do have it. Possibly someone else may have one?
My laziness is gone. Here is a proposed solution for 7.3!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-15-2010 10:49 AM
The default background web page is "Welcome.htm" for MAS 500 7.3. The user desktop settings appears to be quite different from 7.2 and I could not find the web page location easily in the database in order to change it.
Well, after same research I found that there are three columns that has a value of "Welcome.htm" in our entire database as follows.
TableName ColumnName
tsmPrimaryMenuItem GroupContentPathdbo
tsmPrimaryMenuItem TaskValuedbo
tsmUserMenuItem TaskValue
It turns out once that the tsmPrimaryMenuItem.GroupContentPath field is what I had to change, but only for those records where the Caption field is equal 'Home'.
This is my code to do that:
Warning!
Do not try this at home or on your production server! Use the provided script at your own risk.
--------------------------------------------------
USE [mas500_app]
GO
BEGIN TRAN testupdate
IF @@SERVERNAME = 'prod server name' --TO DO fill in your PRODUCTION SERVER name
BEGIN
PRINT '*************************************************
PRINT 'WHAT ARE YOU CRAZY? DON"T RUN THIS IN PRODUCTION!'
PRINT '*************************************************
END
ELSE
BEGIN
UPDATE tsmPrimaryMenuItem
SET GroupContentPath =
CASE
WHEN @@SERVERNAME = 'TEST' THEN 'file:\\blablabla\Server_D2ITBC024.html'
WHEN @@SERVERNAME = 'D1ITSV019' THEN 'file:\\blablabla\Server_D1ITSV019.html'
WHEN @@SERVERNAME = 'D1ITSV025' THEN 'file:\\blablabla\Server_D1ITSV025.html'
ELSE GroupContentPath
END
FROM tsmPrimaryMenuItem
WHERE Caption = 'Home' and GroupContentPath LIKE '%.htm%'
END
ROLLBACK TRAN testupdate
--COMMIT TRAN testupdate
--------------------------------------------------
Since I have a limited knowledge about MAS500 7.3 this could be a wrong way to do it. (But it worked for me) If you have anything to add to make it better or understand how the desktop configuration works, please do not hesitate and post up.
Thank you!
- « Previous
-
- 1
- 2
- Next »


