Discussions
How can I programmatically change the password for an account
I have administrative privileges and want to be able to change the employee password using SuiteTalk. I can do the following to grab the employee object:
EmployeeSearch empsrch = new EmployeeSearch();
EmployeeSearchBasic basic = new EmployeeSearchBasic();
SearchStringField sfEmpId = new SearchStringField();
sfEmpId.searchValue = login; // tranId contains 11
sfEmpId.@operator = SearchStringFieldOperator.contains;
sfEmpId.operatorSpecified = true;
basic.email = sfEmpId;
//basic.customFieldList = cFields;
empsrch.basic = basic;
SearchResult searchRes = s.search(empsrch);
Employee emp;
for (int i = 0, j = (searchRes.pageIndex - 1) * searchRes.pageSize; i < searchRes.recordList.Length; i++, j++)
{
emp = (Employee)searchRes.recordList[i];
// Read the Employee record containing the SalesOrderItemList collection
RecordRef recordRef = new RecordRef();
recordRef.internalId = emp.internalId;