SalesForce API (엔터프라이즈 WSDL)를 통해 레코드를 업데이트하려고합니다.SalesForce API에서 업데이트가 작동하지 않습니다.
아래의 코드는 정상적으로 실행되고 반환 된 saveResult는 작업이 성공했다고 표시합니다.
그러나 SalesForce를 보면 레코드가 업데이트되지 않았습니다. 내가 생각할 수있는 유일한 것은 내가 잘못된 ID를 사용하고 있다는 것입니다. 그러나 나는 5 배로 이것을 체크하고 다시 체크 한 다음 다시 체크했습니다.
이전에 이런 사람이 발생 했습니까? 누군가가 내가 아마 API에 Update 메서드를 호출 닷넷을 사용하는 경우
sforce.Participant__c updateParticipant = new sforce.Participant__c();
updateParticipant.Id = participant.Id.Length == 15? participant.Id : participant.Id.Substring(0, 15);
if (updateType == "pre")
{
updateParticipant.Manual_Download_Date__c = DateTime.Now;
updateParticipant.Manual_Download__c = true;
}
else if (updateType == "post")
{
updateParticipant.Post_Class_Manual_Download__c = true;
updateParticipant.Post_Class_Manual_Downloaded_Date__c = DateTime.Now;
}
sforce.SaveResult[] result = SFLib.sfdc.update(new sforce.sObject[] { updateParticipant });
if (result == null || result.Length <= 0)
return false;
else
{
if (result[0].success == true)
return true;
else
throw new Exception("Update participant failed", new Exception(result[0].errors[0].message));
}
아래 질문에 답을 입력하고이 질문을 공개하지 않으려면 답변을 수락하십시오. – mmix