|
|
|
|
|
<sfConnection variable>.Delete (Function) In french: <Variable sfConnexion>.Supprime Deletes records from a Salesforce database.
Cnx is sfConnection
Cnx.Login = "balthazar@gmail.com"
Cnx.Password = "azerty" + "XXB12VCZ54"
IF Cnx.Connect() = False THEN
Error("La connexion a échoué")
RETURN
END
ResRequête is sfExecuteQueryResult
ResRequête = Cnx.ExecuteQuery("SELECT Date__c,Miles__c,Contact__c FROM Mileage__c")
MonEnregistrement is sfObject
FOR EACH MonEnregistrement OF ResRequête.Object
Trace("---- Type : " + MonEnregistrement.ObjectType + " | ID : " + MonEnregistrement.ID)
Trace(MonEnregistrement..Date__c + " / " + MonEnregistrement..Miles__c + ...
" / " + MonEnregistrement..Contact__c)
END
tabSuppr is array of strings
tabSuppr.Add(ResRequête.Object[1].ID)
ResSuppr is array of sfDeleteResult
ResSuppr = Cnx.Delete(tabSuppr)
FOR EACH res OF ResSuppr
Trace("ID : " + res..ID + " - Suppression = " + res..Success)
END
Syntax
<Result> = <Salesforce connection>.Delete(<Records to delete>)
<Result>: Array variable Array of sfDeleteResult variables containing the deleted data. <Salesforce connection>: sfConnection variable Name of the variable of type sfConnection to be used. <Records to delete>: Array variable Array of character strings containing the Salesforce identifiers of the records to delete. Remarks Possible error cases: - The Internet connection is not valid.
- The authentication was not performed properly.
- The XML response of the server cannot be read.
To find out whether an error occurred, use the ErrorOccurred variable.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|