PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Properties specific to the description of 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
sfDeleteResult (Type of variable)
In french: sfRésultatSupprime (Type de variable)
The sfDeleteResult type is used to find out the result of SFDelete. The characteristics of this result are returned by several WLanguage properties.
Note: See Declaring a variable for more details.
Versions 20 and later
Linux This type of variable is now available for WINDEV applications in Linux.
New in version 20
Linux This type of variable is now available for WINDEV applications in Linux.
Linux This type of variable is now available for WINDEV applications in Linux.
Example
// Connect to Salesforce
Cnt is sfConnection
Cnt..Login = "vince@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, ResQuery..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 the description of sfDeleteResult variables

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

Note: These properties can be used with one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

Functions that handle the sfDeleteResult type

Versions 14 and later
SFDelete
New in version 14
SFDelete
SFDelete
Deletes records from a Salesforce database.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment