|
|
|
|
|
- Properties specific to sfSaveResult variables
- Functions that use the sfSaveResult type
sfSaveResult (Variable type) In french: sfRésultatSauvegarde
The sfSaveResult type is used to find out the result of SFAdd and SFModify. The characteristics of this result are returned by several WLanguage properties. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Cnx is sfConnection
Cnx.Login = "balthazar@gmail.com"
Cnx.Password = "azerty" + "XXB12VCZ54"
IF SFConnect(Cnx) = False THEN
Error("La connexion a échoué")
RETURN
END
ResRequête is sfExecuteQueryResult
ResRequête = SFExecuteQuery(Cnx, "SELECT Date__c,Miles__c,Contact__c FROM Mileage__c")
UnEnregistrement is sfObject
FOR EACH UnEnregistrement OF ResRequête.Object
Trace("---- Type : " + UnEnregistrement.TypeObjet + " | ID : " + UnEnregistrement.ID)
Trace(UnEnregistrement.Date__c + " / "+ UnEnregistrement.Miles__c + ...
" / "+ UnEnregistrement.Contact__c)
END
UnEnregistrement = ResRequête.Object[1]
UnEnregistrement.Miles__c = 698
tabObjets is array of 1 sfObject
Add(tabObjets, UnEnregistrement)
NouvelEnreg is sfObject
NouvelEnreg.TypeObjet = "Mileage__c"
NouvelEnreg.Date__c = "2009-02-15"
NouvelEnreg.Miles__c = 222
Add(tabObjets, NouvelEnreg)
tabRes is array of sfSaveResult
tabRes = SFModify(Cnx, tabObjets, sfCreateIfNotFound, "IDExterne")
FOR EACH res OF tabRes
Trace("Succès = " + res.Succès + " | Créé : " + res.Créé)
END
Properties Properties specific to sfSaveResult variables The following properties can be used to handle the result of SFAdd and SFModify: | | | Name | Type used | Effect |
---|
Created | Boolean | - True if the record was created,
- False if the record was modified or if an error occurred.
| Error | Array of sfError | Status report of errors. | ID | Character string | Identifier of created or modified object. This property is read-only. | Success | Boolean | - True if the modification or the creation was performed,
- False otherwise.
|
Remarks Functions that use the sfSaveResult type | | SFAdd | Creates a record in a file of a Salesforce database. | SFModify | Modifies the records of a file defined in Salesforce. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|