You need to sign in to do that
Don't have an account?
kiran ravi
Error:sObject type 'Person__c' is not supported.
Please help me. Becuase im very new to sales force. how i can solve this problem
global 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__c = expName;
c.Exp_Date__c = Date.today();
c.Paid_By__c = p.Id;
insert c;
return c;
}
}
can you please try with giving different name of alias and the variable. Currently, both are the same.
Person__c p = [Select p.Name From Person__c p Where Name = :paidByName limit 1];
try like this
Person__c p = [Select Name From Person__c Where Name = :paidByName limit 1];
sir ,
i have done above corrections. it was not working. it showing the same error
Compile Error: sObject type 'Person__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. at line 9 column 23
or else i need add or create any packages before this.im not getting please help me
Thank you
make sure you are refereing to correct API name of your custom object person...
Hi,
Are the data types are similar: Is the data type of Amount__c of Expenditure is also Decimal? Plz confirm?
global 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__c = expName;
c.Exp_Date__c = Date.today();
c.Paid_By__c = p.Id;
insert c;
return c;
}
}
Thank you sir,
I have done changes.its working fine.
im working on integration asp.net with salesforce.please help me for further steps
Where was the issue??
im integrating salesforce with asp.net
we have one registration form after clicking send button in registration form the which was entered need go the salesforce
leads tab.
im unaware of apex classes .please help me
Ex:
/services/data/v39.0/
/services/data/v45.0/