Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
New Member
Posts: 15
Registered: ‎08-15-2013

Managing Default Lookup Layout for Slx Web Client

Is it possible to set all users lookup group to a common group?


Is it possible to do as a mas update without having to log in as each user to update?

Copper Elite Contributor
Posts: 40
Registered: ‎03-31-2010

Re: Managing Default Lookup Layout for Slx Web Client

We did something similar which I'm sure could be adapted.  Basically we have over a thousand users and from time to time one or more of them get their settings out of whack or we descide that the default for a particular setting should be overridden for everyone.


First we modify the USEROPTIONDEF table to the default setting we want all users to have when they're first created (not sure if this applies to your scenario).


Then we added added a new Tasklet link to the \supportfiles\SmartParts\TaskPane\AdminTasks\UserTasklet.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UserTasklet.ascx.cs" Inherits="UserTaskletControl" %>

<asp:HiddenField ID="hfSelections" runat="server" Value="" />
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="SAG">
        <div data-dojo-type="Sage.TaskPane.UserTasklet" id="userTasklet"></div>
        <asp:Button runat="server" OnClick="tskAddUserToRole_Click" ID="tskAddUserToRole" CausesValidation="false" style="display:none;" />
        <asp:Button runat="server" OnClick="tskResetUsers_Click" ID="tskResetUsers" CausesValidation="false" style="display:none;" />
		<!-- 20140627.gdf.start -->
        <asp:Button runat="server" OnClick="tskResetUserOptions_Click" ID="tskResetUserOptions" CausesValidation="false" style="display:none;" />
		<!-- 20140627.gdf.end -->

 Then we add the click event code to the related UserTasklet.ascx.cs file to call the RemoveUserOptions() entity business rule method for the selected users


protected void tskResetUserOptions_Click(object sender, EventArgs e)
        var selected = GetSelectedRecords();
        foreach (var item in selected)
            var user = Sage.Platform.EntityFactory.GetById<IUser>(item);
            string userId = user.Id.ToString();

			Sage.Platform.Application.Services.IUserOptionsService userOption = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Application.Services.IUserOptionsService>(true);

This essentially removes all their current custom settings and puts them back to our predetermined defaults (as we setup in the USEROPTIONDEF table).


Hope this helps




James Sutton