...
Code Block |
---|
| SalesforceSession salesforceSession = new SalesforceSession(new LoginDetails("username@example.com", "salesforcePassword"));
//specify the API name of the Salesforce Object
String salesforceObject = "My_Custom_Object__c";
FieldService fieldService = FieldService.Instance(salesforceObject, salesforceSession);
List<SalesforceField> fields = fieldService.FieldsForObject();
//output the label andsome field namemetadata
foreach (SalesforceField field in fields)
{
Console.WriteLine(field.label + ": " + field.name);
Console.WriteLine("Field Type: " + field.type);
} |
|
If changes are made to a Salesforce Object while an S4S Salesforce Session is zzz, then you will need to clear the session binding cache for the session user:
...