0

Please help me, I'm using SalesForce Enterprise API for update Opportunity with my C# code:

QueryResult query = service.query("SELECT ID,ChargentSFA__Gateway__c FROM Opportunity WHERE       AccountId = '" + accountItem.Id + "'");
if (query.records != null && query.records.Length > 0)
{
Opportunity opportunity = query.records[0] as Opportunity;
SaveResult update_result = new SaveResult();
opportunity.Acct_Email__c = accountItem.PersonEmail;
update_result = service.update(new sObject[] { opportunity })[0];
if (update_result.success)
{
// TODO
}
else
{
Logs(update_result.errors[0].message);
// TODO
}
}

All data input is true but it away show me a error with

StatusCode.FIELD_FILTER_VALIDATION_EXCEPTION

Message: "Please choose an Active Gateway record"

Error field: ChargentSFA_Gateway_c

Please give me your opinion on this error.

Thanks!

4

1 に答える 1

1

The Chargent CC Gateway object the opportunity is referring to has been deactivated. And the error message is from a validation rule preventing references to inactive gateways.

For more information see the documentation here

于 2012-08-09T04:49:44.143 に答える