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
  • Properties specific to sfObject variables
  • Functions that use the sfObject type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
sfObject (Variable type)
In french: sfObjet
The sfObject type is used to describe a record of a SalesForce file. You can define and change the characteristics of this type of variable using different WLanguage properties.
This type of variable is used by the following types of variables:
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
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")

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

Properties specific to sfObject variables

The following properties can be used to handle a record of a Salesforce file:
NameType usedEffect
IDCharacter stringIdentifier of the record.
NullItemCharacter stringList of record items with no value. The different items are separated by CR characters (Carriage Return).
ObjectTypeCharacter stringName of the file to which the record belongs. This name must correspond to the name defined in the Salesforce interface as the "API name".
For a custom file, this name corresponds to the name of the file followed by 2 underscore characters then by the letter "c". For example: "MyAccount__c".
<Item name>Type of itemAllows you to access any file item directly via its name.
Remark: The field name must match the name defined in the Salesforce interface as the "API Name".. For a custom file, this name corresponds to the name of the item followed by 2 underscore characters then by the letter "c". For example: "DateOuverture__c".
Remarks

Functions that use the sfObject type

SFAddCreates a record in a file of a Salesforce database.
SFModifyModifies the records of a file defined in Salesforce.
SFReadRetrieves the Salesforce records from their identifiers.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help