Skip to main content
Mar 4, 2020 12:05 PM UTC
Solved

Update Home Mashup for users in bulk

Hi,

 

I have a requirement where I need to update the Home Mashup and Mobile mashup for all the users. There are about 1000 users which I need to update this. Is there a way for updating these in bulk (ex: back end update from Postgresql )

 

Regards,

Srikrishna Kanth.

Mar 4, 2020 6:52 PM UTC

Hello @SriKrishna,

 

No need to go into Postgres, a simple service will do it:

var users = Resources["SearchFunctions"].SearchPeople({}).commonResults;
for (var i = 0; i < users.length; ++i) {
 var user = Users[users[i].name];
 user.SetHomeMashup({ name: "MyMashup" });
 user.SetMobileMashup({ name: "MyMashup" });
}

 

Regards,
Constantine 

2 replies

Mar 4, 2020 6:52 PM UTC

Hello @SriKrishna,

 

No need to go into Postgres, a simple service will do it:

var users = Resources["SearchFunctions"].SearchPeople({}).commonResults;
for (var i = 0; i < users.length; ++i) {
 var user = Users[users[i].name];
 user.SetHomeMashup({ name: "MyMashup" });
 user.SetMobileMashup({ name: "MyMashup" });
}

 

Regards,
Constantine 

Mar 17, 2020 8:53 AM UTC

Thank you for your clear answer.

8 ball pool