SFDC.SalesforceApi
1.0.0.3
dotnet add package SFDC.SalesforceApi --version 1.0.0.3
NuGet\Install-Package SFDC.SalesforceApi -Version 1.0.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SFDC.SalesforceApi" Version="1.0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SFDC.SalesforceApi" Version="1.0.0.3" />
<PackageReference Include="SFDC.SalesforceApi" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SFDC.SalesforceApi --version 1.0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SFDC.SalesforceApi, 1.0.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SFDC.SalesforceApi@1.0.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SFDC.SalesforceApi&version=1.0.0.3
#tool nuget:?package=SFDC.SalesforceApi&version=1.0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Code to Create Matadata Custom Fields:
@using SFDC
SalesForceApi api = new SalesForceApi();
var loginInfo = api.Login("abc@m.com", "********");
ElementModel model = new ElementModel()
{
FullName = "Account.CustomFieldTest3__c",
Type = FieldType.Url,
Label = "CustomTest",
};
MetadataApi meta = new MetadataApi(loginInfo.sessionId,loginInfo.metadataServerUrl);
UpsertResult[] result = meta.CreateCustomField(model);
Custom Objects :
CustomObject co = new CustomObject();
co.fullName = model.FullName.Replace(' ', '_') + "__c";
co.deploymentStatus = DeploymentStatus.Deployed;
co.deploymentStatusSpecified = true;
co.description = model.Description;
co.enableActivities = true;
co.label = model.Label;
co.pluralLabel = model.Label + "s";
co.sharingModel = SharingModel.ReadWrite;
co.sharingModelSpecified = true;
co.fields = new CustomField[]{};
co.nameField = new CustomField();
co.nameField.label = model.Label;
co.nameField.type = FieldType.Text;
co.nameField.typeSpecified = true;
UpsertResult[] result2 = meta.UpsertCustomObject(co);
Create/Update an actual Opportunity/Contact
SalesForceApi api2 = new SalesForceApi("endPointUrl","sessionId");
CreateSObject opportunity = new CreateSObject()
{
Type = "Opportunity",
Fields = new List<ElementField>()
{
new ElementField()
{
Key = "Name",
Value = "My New Opportunity Name"
},
new ElementField()
{
Key = "Amount",
Value = "999"
},
}
};
SFDC.soapApi.SaveResult[] saveResults = api2.CreateElement(opportunity);
UpdateSObject contact = new UpdateSObject()
{
Id = "0031W0000213yCzQAI",
Type = "Contact",
Fields = new List<ElementField>()
{
new ElementField()
{
Key = "FirstName",
Value = "Otto"
},
new ElementField()
{
Key = "LastName",
Value = "Jespersen"
},
}
};
SFDC.soapApi.SaveResult[] saveResults = api2.UpdateElement(contact);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Summary of changes made in this release of the package.