ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Salesforce functions
  • Possible error cases:
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
SFEmptyRecycleBin (Function)
In french: SFVideCorbeille
Clears the specified records from the Salesforce recycle bin.
Remark: After 30 days, items in the Salesforce recycle garbage can are automatically deleted.
Example
// Connexion à Salesforce
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")

MonEnregistrement is sfObject
FOR EACH MonEnregistrement OF ResRequête.Object
	Trace("---- Type : " + MonEnregistrement..Type + " | ID : " + MonEnregistrement.ID)
	Trace(MonEnregistrement..Date__c + " / " + MonEnregistrement..Miles__c + " / " + ...
		MonEnregistrement..Contact__c)
END

// Suppression d'un objet
tabSuppr is array of strings
Add(tabSuppr, ResRequête.Object[1].ID)

tabResSuppr is array of sfDeleteResult
tabResSuppr = SFDelete(Cnx, tabSuppr)
FOR EACH res OF tabResSuppr
	Trace("ID : " + res..ID + " - Suppression = " + res..Success)
END

tabResVideCorb is array of sfEmptyRecycleBinResult
tabResVideCorb = SFEmptyRecycleBin(Cnx, tabSuppr)
FOR EACH res OF tabResVideCorb
	Trace("ID : " + res..ID + "- VideCorbeille  = " + res..Success)
END
Syntax
<Result> = SFEmptyRecycleBin(<Salesforce connection> , <Records to delete>)
<Result>: Array of sfEmptyRecycleBinResult
Array of sfEmptyRecycleBinResult variables that contains the records deleted from the recycle bin.
<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 from the recycle bin.
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.
Component: wd300ggl.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help