Create the webservice using apex in salesforce and consume it in C#.Net application.
In Salesforce create below class:
global public with sharing class SaveExpenditureWebService { webservice static Expenditure__c createExpenditure(Decimal amount,String expName, String paidByName ) { Expenditure__c c = new Expenditure__c(); Person__c p = [Select p.Name From Person__c p Where Name = :paidByName limit 1]; c.Amount__c = amount; c.Name = expName; c.Exp_Date__c = Date.today(); c.Paid_By__c = p.Id; insert c; return c; } }
You can expose your Apex class methods as a REST or SOAP web service operation. By making ... resources. The application calls an Apex web service class to manage Salesforce case records. ..... The test results display in the Tests tab. More at Click Here (http://centralmenus.co.uk/smiths-ongar-menu-prices-locations/)
https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
In Salesforce create below class:
global public with sharing class SaveExpenditureWebService
{
webservice static Expenditure__c createExpenditure(Decimal amount,String expName, String paidByName )
{
Expenditure__c c = new Expenditure__c();
Person__c p = [Select p.Name From Person__c p Where Name = :paidByName limit 1];
c.Amount__c = amount;
c.Name = expName;
c.Exp_Date__c = Date.today();
c.Paid_By__c = p.Id;
insert c;
return c;
}
}
Alice Smith
App Developer
http://qwikfix.co.uk/sky-customer-services/