Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Can't find a way to search contacts as Expert Search functionality removed.

Occasional Visitor

Can't find a way to search contacts as Expert Search functionality removed.

I have sys admin rights but recently expert search was removed due to a risk issue.

 

Out of the 100,000+ contacts, it was easy to use expert search to find any number of contacts as I know their user.id.

 

Now I have no idea how to get back the 1000 contacts I need to mass update. I know who they are but I can't do it manually.

 

Is there a way to use the advanced filter? I couldn't work it out so as a last resort, thought I would ask some experts.

 

Any ideas?

 

Thanks,

5 REPLIES
Honored Contributor [Founder]

Re: Can't find a way to search contacts as Expert Search functionality removed.

You can write short sl to update the required records if you have exact  parametrs based on which you can query that exact contacts.

Occasional Visitor

Re: Can't find a way to search contacts as Expert Search functionality removed.

Hi Vadim.

 

Thanks for your response.

 

I know the fields I need to update and the values they need to be and I know all of the users/contacts via their user.id but I wouldn't know about writing a short sl.

 

I would have thought there be an easy way to be able to enter the criteria similar to advanced search somewhere is within Service Manager.

 

Expert Search was the most useful feature for me for finding a whole load of contacts from their user.id.

 

 

Highlighted
Advisor

Re: Can't find a way to search contacts as Expert Search functionality removed.

Here is a sample javascript to search and update contacts

 

function UpdateContacts()
{
// this line creates a new file object pointing to the contacts table
var contacts=new SCFile("contacts");

// this is the query we will use to search. It uses the exact same rules as an export search. 
// Use \" to embed a double-quote in the query
var query="contact.name = \"alrussel\"";

	// do the query
	if ( contacts.doSelect(query) == RC_SUCCESS )
		{
		// loop through each of the records it finds
		do
			{
			print("Updating: " + contacts.contact_name);
			// change / update the data here. 
			//Field names with dots have the dots replaced with underscores 
			//because a dot is a js reserved word
			contacts.beeper_phone="New pager number";
			contacts.doUpdate();  // update this record
			}
		while ( contacts.getNext() == RC_SUCCESS );  // see if there are more records matching this query
		}
}

// actually call the function and have it do the updates
UpdateContacts();

 

 

 

Frequent Advisor

Re: Can't find a way to search contacts as Expert Search functionality removed.

Hi,

 

What Alex suggested above should work just fine.

 

If you have not deleted the DO Expert Search then you should be able to access it via the DB when you open the "contacts" table.

 

Best Regards,

Miro

Occasional Visitor

Re: Can't find a way to search contacts as Expert Search functionality removed.

Hi Alex.


Thanks a lot for this. Fortunately I managed to find out that a generic account still had the permissions to do expert search and was able to do what I needed to.

 

The option for expert search is still there but it brings back no results without it even going to the expert search screen.

 

As I'm not classically trained in SM9, I thought it best not to mess too much.

 

Thanks for everyones help.