Re: Can't find a way to search contacts as Expert Search functionality removed.
// 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
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