I connected to salesforce and I got the auth token How can I create a opportunity and quote using Force.com-Toolkit-for-NET.
Thanks in advance.
For interacting with Salesforce you can use ForceClient
class which provide methods for all CRUD operations with SF Objects. For creation objects you should use CreateAsync()
method. Here are few examples:
dynamic quote = new ExpandoObject();
quote.Name = QuoteName;
quote.OpportunityId = OpportunityId;
var createQuoteResponse = await client.CreateAsync( "Quote", quote );
quote.Id = createQuoteResponse.Id;
if ( quote.Id != null ) {
Console.WriteLine( "Quote created with Opportunity Id : " + OpportunityId + " , Quote Name : " + quote.Name );
}
This works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.