ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Salesforce functions
  • Properties specific to sfDeleteResult variables
  • Functions that handle the sfDeleteResult type
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
sfDeleteResult (Type of variable)
In french: sfResultatSupprime
The sfDeleteResult type is used to find out the result of SFDelete. The characteristics of this result are returned by several WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Connect to Salesforce
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")
 
MyRecord is sfObject
FOR EACH MyRecord OF ResQuery.Object
Trace("---- Type: " + MyRecord.ObjetType + " | ID: " + MyRecord.ID)
Trace(MyRecord.Date__c + " / " + ...
MyRecord.Miles__c + " / " + MyRecord.Contact__c)
END
 
// Delete an object
arrDel is array of strings
Add(arrDel, QueryRes.Object[1].ID)
 
ResDel is array of sfDeleteResult
ResDel = SFDelete(Cnt, arrDel)
FOR EACH res OF ResDel
Trace("ID: " + res.ID + " - Deletion = " + res.Success)
END
Remarks

Properties specific to sfDeleteResult variables

The following properties can be used to handle the result of SFDelete:
Property nameType usedEffect
ErrorArray of sfErrorStatus report of errors.
IDCharacter stringSalesforce identifier of the deleted record.
This property is read-only.
SuccessBoolean
  • True if the deletion was performed,
  • False if an error occurs.

Functions that handle the sfDeleteResult type

SFDeleteDeletes records from a Salesforce database.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help