|
|
|
|
|
- Properties specific to sfSaveResult variables
- Functions that use the sfSaveResult type
sfSaveResult (Variable type)
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.
Cnt is sfConnection
Cnt.Login = "balthazar@gmail.com"
Cnt.Password = "qwerty" + "XXB12VCZ54"
IF SFConnect(Cnt) = False THEN
Error("The connection failed")
RETURN
END
ResQuery is sfExecuteQueryResult
ResQuery = SFExecuteQuery(Cnt, "SELECT Date__c,Miles__c,Contact__c FROM Mileage__c")
ARecord is sfObject
FOR EACH ARecord OF ResQuery.Object
Trace("---- Type: " + UnEnregistrement.TypeObjet + " | ID: " + UnEnregistrement.ID)
Trace(ARecord.Date__c + " / "+ ARecord.Miles__c + ...
" / "+ ARecord.Contact__c)
END
ARecord = ResQuery.Object[1]
ARecord.Miles__c = 698
arrObjects is array of 1 sfObject
Add(arrObjects, ARecord)
NewRec is sfObject
NewRec.ObjectType = "Mileage__c"
NewRec.Date__c = "2009-02-15"
NewRec.Miles__c = 222
Add(arrObjects, NewRec)
arrRes is array of sfSaveResult
arrRes = SFModify(Cnt, arrObjects, sfCreateIfNotFound, "IDExternal")
FOR EACH res OF arrRes
Trace("Success = " + res.Success + " | Created: " + res.Created)
END
Propiedades 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.
|
Observaciones 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. |
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|