You need to sign in to do that
Don't have an account?
Bhushan burujwale
soap api to update the isfrozen attribute
Hi Team,
Can you please let me know how I can update the isFrozen attribute using soap API ?
Can you please let me know how I can update the isFrozen attribute using soap API ?
Sample code from Java application to freeze a user:
SObject[] records = new SObject[5];
QueryResult queryResults = connection.query("SELECT Id, IsFrozen FROM UserLogin WHERE UserId ='sampleuserid' limit 1");
if (queryResults.getSize() > 0) {
for (int i=0;i<queryResults.getRecords().length;i++) {
// cast the SObject to a strongly-typed Account
UserLogin a = (UserLogin)queryResults.getRecords()[i];
a.setField("isFrozen","TRUE");
records[i] = a;
}
}
// update the records in Salesforce.com
SaveResult[] saveResults = connection.update(records);
We are using partner WSDL, so we set the type of object we update. We dont have possibility to type cast it
Can you please provide me the sample code for partner WSDL
soUpdate.setType("???????");
soUpdate.setField("?????", "TRUE");
soUpdate.setType("UserLogin");
soUpdate.setField("isFrozen", "TRUE");