We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Ejuser record for associate

Hello,

Is there a way to programmatically make sure that every associate with a license also has an ejuser record?

We are migrating an superoffice 7.1 customer to 8.2, and part of the migration is to convert data from an previous solution that used custom dictionary sdk tables to Customer Service tickets.

Currently this data uses associate id's as key to the user which 'owns' the record, and we need to map every associate to an ejuser.

Currently of the ~200 associates in the system, only 22 ejuser records exist.. Any way to use crmscript or the netserver (core) so that we can force the system to create a record for every associate?

Thanks,

David

RE: Ejuser record for associate

When you say that only 22 of 200 have row in crm7.ejuser, is that while you're on 7.1 or on 8.2? Gut feeling is that after upgrading to 8.2 you should end up with an ejuser row for all associates.

Av: Frode Lillerud 22. mar 2018

RE: Ejuser record for associate

Same for 7.1 and 8.2 (test environment for now). both only have 22 records.

Av: David Hollegien 22. mar 2018

RE: Ejuser record for associate

There should be a log created during upgraded from 7.1 to 7.5, this is where we merged groups and roles in Sales and Service. Does it give any indication to what happened to the users?

You have the userplans to assign them, but would the get the same id so the history is kept if you just re-assign?

Did you contact support regarding this? Refer to this thread if you do.

Av: Margrethe Romnes 23. mar 2018

RE: Ejuser record for associate

"There should be a log created during upgraded from 7.1 to 7.5, this is where we merged groups and roles in Sales and Service. Does it give any indication to what happened to the users?"

No, just logging about creating the user groups for service.

 

I see what is happening now, all the users that dont have an ejuser are either retired now, or have a sales plan, not complete or service. Is it correct that only service/complete users get an ejuser row?

Av: David Hollegien 23. mar 2018

RE: Ejuser record for associate

Looks like when i change something of the user in the admin panel, and then save it, the ejuser record is created.

Is there a way to replicate this using netserver/crmscript ? Dont feel like doing that for 200 users multiple times...

Av: David Hollegien 23. mar 2018

RE: Ejuser record for associate

This is OnSite? Then anything you can do from web admin, is possible via code.

For CRM Online however, user is one of the protected agents that you will not have access to via an app.

Av: Margrethe Romnes 23. mar 2018

RE: Ejuser record for associate

Yes, this in OnSite, Currently using netserver core to import tickets (can't use services layer...).

Not sure how to trigger the ej user record creation in netserver, will do some research.

Av: David Hollegien 23. mar 2018

RE: Ejuser record for associate

After some decompiling to find out what the services layer and souser class do behind the curtain, I now have the following code to force the netserver to create ejuser records.

            SuperOffice.CRM.Rows.AssociateRows.CustomSearch _AssociatesWithoutEjUserSearch = new SuperOffice.CRM.Rows.AssociateRows.CustomSearch();
            _AssociatesWithoutEjUserSearch.Restriction = _AssociatesWithoutEjUserSearch.TableInfo.EjUserId.Equal(SuperOffice.Data.S.Parameter(0));

            SuperOffice.CRM.Rows.AssociateRows _Associates = SuperOffice.CRM.Rows.AssociateRows.GetFromCustomSearch(_AssociatesWithoutEjUserSearch);

            foreach (SuperOffice.CRM.Rows.AssociateRow _Associate in _Associates)
            {
                SuperOffice.CRM.Administration.SoUser _User = SuperOffice.CRM.Administration.SoUser.ManageUser(_Associate.AssociateId);

                _User.Save();
            }
Av: David Hollegien 23. mar 2018