-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
12Questions
-
27Replies
test class for asyncronous methods (callout)
I have a Asynchronous outbound call, which is called from a trigger. I am struck to write a test class for my outbound call ( synchronous ), can any one please help me how to write a test class for my outbound call. Any help must be highly appreciated.
Thanks a lot in advance!
Regards,
rsk
-
- satheeshrsk
- December 30, 2014
- Like
- 0
- Continue reading or reply
how to test blank value for Integer
Hi All,
Is there any way to test blank values for Integer fileds, for Strings fields
if( Str == '') or Isblank(Str) ...
Any help must be highly appreciated.
Thanks in advance !
-
- satheeshrsk
- September 26, 2013
- Like
- 0
- Continue reading or reply
Can we generate a enterprise wsdl with only login method ?
Hi All,
Is it possible to generate a Enterprise WSDL with Only Login method. Any help is highly appreciated.
Thanks in advance!
RSK
-
- satheeshrsk
- September 13, 2013
- Like
- 0
- Continue reading or reply
Twitter Integration
Hi All,
I need to Integrate Twitter with Salesforce and get the tweets / posts into salesfoce chatter. Can anyone please give some idea / sample code ? Any help is highly appreciated.
Thanks a ton inadvance.
-
- satheeshrsk
- March 15, 2013
- Like
- 0
- Continue reading or reply
Urgent help: Constructor not defined
Hi All,
Getting the following error,can any one help if any idea ?
![]() | Error: Compile Error: Constructor not defined: [System.SelectOption].<Constructor>(Date, String) at line 15 column 29 |
Controller class:
public with sharing class CustomSettingsDemo_CLS{
public String selectedIso {get;set;}
public CustomSettingsDemo_CLS(ApexPages.StandardController controller) {
}
public List<selectOption> fqCodes {
get {
List<selectOption> options = new List<selectOption>();
for (FiscalQuarters__c fq : FiscalQuarters__c.getAll().values())
options.add(new SelectOption(fq.CustomFiscalQuarters__c,fq.Name+' - '+fq.CustomFiscalQuarters__c));
return options;
}
set;
}
}
Using custom setting in the controller class, any help is highly appreciated.
Thanks in advance,
rsk
-
- satheeshrsk
- October 17, 2012
- Like
- 0
- Continue reading or reply
How to add custom button to Product related list on Opportunity page
Hi,
I am trying to add a custom button to the Product related list on my Opportunity page. It does not shows any custom buttons section on Product related list. The button type is List Button and the VF page uses standard controller and extension controller class. Any help must be highly appreciated.
Thanks in advance !
-
- satheeshrsk
- August 17, 2012
- Like
- 0
- Continue reading or reply
500, internal server error
Hi,
I am trying to make a callout from APEX to an HTTP endpoint(Hoover's API) but am receiving the following error:
500, internal server error'.
Here is my Apex class :
global public with sharing class HttpCallout_CLS {
Public static void sendRequest(){
String API_KEY = 'XXX';
env = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://applications.dnb.com/webservice/schema/">'+
'<soapenv:Header>'+
'</soapenv:Header>'+
'<soapenv:Body>'+
'<sch:FindCompanyByKeywordRequest>'+
'<sch:sortDirection>Ascending</sch:sortDirection>'+
'<sch:keyword>xyz</sch:keyword>'+
'<sch:searchBy>companyName</sch:searchBy>'+
'<sch:returnSearchNavigation>false</sch:returnSearchNavigation>'+
'<sch:orderBy xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>'+
'<sch:searchNavigation>'+
'<sch:employeeSearchNavigation>'+
'</sch:employeeSearchNavigation>'+
'<sch:ownershipTypeSearchNavigation>'+
'</sch:ownershipTypeSearchNavigation>'+
'<sch:locationTypeSearchNavigation>'+
'</sch:locationTypeSearchNavigation>'+
'<sch:salesSearchNavigation>'+
'</sch:salesSearchNavigation>'+
'<sch:locationSearchNavigation>'+
'<sch:countryNavigation>'+
'<sch:countryNavigationValue>${#Project#countryNavigationValue}</sch:countryNavigationValue>'+
'<sch:stateNavigation>'+
'<sch:stateNavigationValue>${#Project#stateNavigationValue}</sch:stateNavigationValue>'+
'<sch:cityNavigation>'+
'<sch:cityNavigationValue>${#Project#cityNavigationValue}</sch:cityNavigationValue>'+
'</sch:cityNavigation>'+
'</sch:stateNavigation>'+
'</sch:countryNavigation>'+
'</sch:locationSearchNavigation>'+
'<sch:industrySearchNavigation>'+
'</sch:industrySearchNavigation>'+
'</sch:searchNavigation>'+
'</sch:FindCompanyByKeywordRequest>'+
'</soapenv:Body>'+
'</soapenv:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://hapi.hoovers.com/HooversAPI-32');
req.setMethod('POST');
req.setBody(env);
req.setTimeout(12000);
Blob headerValue = Blob.valueOf(API_KEY);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization',authorizationHeader)
HTTPResponse res = h.send(req);
System.debug(res.getBody());
}
}
-
- satheeshrsk
- March 10, 2011
- Like
- 0
- Continue reading or reply
Unable to connect API (Hoover's) by using HTTP callouts
Hi,
I am trying to make a callout from APEX to an HTTP endpoint(Hoover's API) but am receiving the following error:
500, internal server error'.
Here is my Apex class :
global public with sharing class HttpCallout_CLS {
Public static void sendRequest(){
String API_KEY = 'XXX';
env = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://applications.dnb.com/webservice/schema/">'+
'<soapenv:Header>'+
'</soapenv:Header>'+
'<soapenv:Body>'+
'<sch:FindCompanyByKeywordRequest>'+
'<sch:sortDirection>Ascending</sch:sortDirection>'+
'<sch:keyword>xyz</sch:keyword>'+
'<sch:searchBy>companyName</sch:searchBy>'+
'<sch:returnSearchNavigation>false</sch:returnSearchNavigation>'+
'<sch:orderBy xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>'+
'<sch:searchNavigation>'+
'<sch:employeeSearchNavigation>'+
'</sch:employeeSearchNavigation>'+
'<sch:ownershipTypeSearchNavigation>'+
'</sch:ownershipTypeSearchNavigation>'+
'<sch:locationTypeSearchNavigation>'+
'</sch:locationTypeSearchNavigation>'+
'<sch:salesSearchNavigation>'+
'</sch:salesSearchNavigation>'+
'<sch:locationSearchNavigation>'+
'<sch:countryNavigation>'+
'<sch:countryNavigationValue>${#Project#countryNavigationValue}</sch:countryNavigationValue>'+
'<sch:stateNavigation>'+
'<sch:stateNavigationValue>${#Project#stateNavigationValue}</sch:stateNavigationValue>'+
'<sch:cityNavigation>'+
'<sch:cityNavigationValue>${#Project#cityNavigationValue}</sch:cityNavigationValue>'+
'</sch:cityNavigation>'+
'</sch:stateNavigation>'+
'</sch:countryNavigation>'+
'</sch:locationSearchNavigation>'+
'<sch:industrySearchNavigation>'+
'</sch:industrySearchNavigation>'+
'</sch:searchNavigation>'+
'</sch:FindCompanyByKeywordRequest>'+
'</soapenv:Body>'+
'</soapenv:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://hapi.hoovers.com/HooversAPI-32');
req.setMethod('POST');
req.setBody(env);
req.setTimeout(12000);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
HTTPResponse res = h.send(req);
System.debug(res.getBody());
}
}
Thanks Inadvance,
Satheesh
-
- satheeshrsk
- March 08, 2011
- Like
- 0
- Continue reading or reply
Salesforce.com connection to Hoover's API through Http Callouts
Hi,
I am trying to make a callout from APEX to an HTTP endpoint(Hoover's API) but am receiving the following error:
500, internal server error'.
Here is my Apex class :
global public with sharing class HttpCallout_CLS {
Public static void sendRequest(){
String API_KEY = 'XXX';
env = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://applications.dnb.com/webservice/schema/">'+
'<soapenv:Header>'+
'</soapenv:Header>'+
'<soapenv:Body>'+
'<sch:FindCompanyByKeywordRequest>'+
'<sch:sortDirection>Ascending</sch:sortDirection>'+
'<sch:keyword>xyz</sch:keyword>'+
'<sch:searchBy>companyName</sch:searchBy>'+
'<sch:returnSearchNavigation>false</sch:returnSearchNavigation>'+
'<sch:orderBy xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>'+
'<sch:searchNavigation>'+
'<sch:employeeSearchNavigation>'+
'</sch:employeeSearchNavigation>'+
'<sch:ownershipTypeSearchNavigation>'+
'</sch:ownershipTypeSearchNavigation>'+
'<sch:locationTypeSearchNavigation>'+
'</sch:locationTypeSearchNavigation>'+
'<sch:salesSearchNavigation>'+
'</sch:salesSearchNavigation>'+
'<sch:locationSearchNavigation>'+
'<sch:countryNavigation>'+
'<sch:countryNavigationValue>${#Project#countryNavigationValue}</sch:countryNavigationValue>'+
'<sch:stateNavigation>'+
'<sch:stateNavigationValue>${#Project#stateNavigationValue}</sch:stateNavigationValue>'+
'<sch:cityNavigation>'+
'<sch:cityNavigationValue>${#Project#cityNavigationValue}</sch:cityNavigationValue>'+
'</sch:cityNavigation>'+
'</sch:stateNavigation>'+
'</sch:countryNavigation>'+
'</sch:locationSearchNavigation>'+
'<sch:industrySearchNavigation>'+
'</sch:industrySearchNavigation>'+
'</sch:searchNavigation>'+
'</sch:FindCompanyByKeywordRequest>'+
'</soapenv:Body>'+
'</soapenv:Envelope>';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://hapi.hoovers.com/HooversAPI-32');
req.setMethod('POST');
req.setBody(env);
req.setTimeout(12000);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
HTTPResponse res = h.send(req);
System.debug(res.getBody());
}
}
Thanks Inadvance,
Satheesh
-
- satheeshrsk
- March 07, 2011
- Like
- 0
- Continue reading or reply
How to call an external webservice api from apex through HTTP Call outs
Hi,
This is kumar, I’m new to salesforce. I need to call an external application from Apex through HTTP Call outs. Could any one send me the sample code, how to parse and call (invoke) external application(wsdl). Any help must be appreciated .
Thanks inadvance!
Kumar
-
- satheeshrsk
- January 31, 2011
- Like
- 0
- Continue reading or reply
Case Ownership change DELETES "auto sharing" rules
Every time a case owner is changed (from Queue to Engineer, and vice versa), the automatic sharing rules are deleted, how to write a trigger to automatically reshare, after an ownership change.
Thanks!
-
- satheeshrsk
- August 16, 2010
- Like
- 0
- Continue reading or reply
Not able to see case comments when logged as different user with same profile and role
Hello,
I'm facing a issue with mobile application, I added Case Object to the Dataset and case comments as subset of Case to the mobile configuration. My profile is system admin, the problem is i'm able to see the case comments, but some of other people with different profile and role are not able to see case comments. I tried by changing their profile as admin and as same role i have, but even they are not able to see the case comments.
I tried by changing my profile and role to other user profile, still am able to see the comments for all the cases.
Please let me know what would be issue, this is very high priority. Please throw a light.
Regards,
Satheesh
-
- satheeshrsk
- August 03, 2010
- Like
- 0
- Continue reading or reply
how to test blank value for Integer
Hi All,
Is there any way to test blank values for Integer fileds, for Strings fields
if( Str == '') or Isblank(Str) ...
Any help must be highly appreciated.
Thanks in advance !
- satheeshrsk
- September 26, 2013
- Like
- 0
- Continue reading or reply
Twitter Integration
Hi All,
I need to Integrate Twitter with Salesforce and get the tweets / posts into salesfoce chatter. Can anyone please give some idea / sample code ? Any help is highly appreciated.
Thanks a ton inadvance.
- satheeshrsk
- March 15, 2013
- Like
- 0
- Continue reading or reply
how to sort activity histories based on last modified date
Hi All,
I have replaced Activity History related list with a VF page using Standard Controller, the issue is data is not displaying order by, I want to sort the activity histories based on lastModified date/time, how to do that ? any help is highly appreciated.
Here is the VF:
<apex:page standardController="Case" extensions="ActivityHistory_cls">
<apex:form >
<apex:pageBlock title="Activity History" >
<apex:pageBlockTable value="{!Case.ActivityHistories}" var="list" id="theId">
<apex:column headerValue="Subject"><apex:outputField value="{!list.Subject}"/> </apex:column>
<apex:column headerValue="Name"><apex:outputField value="{!list.WhoId}"/> </apex:column>
<apex:column headerValue="Task"> <apex:outputField value="{!list.IsTask}"/> </apex:column>
<apex:column headerValue="Due Date"> <apex:outputField value="{!list.ActivityDate}"/> </apex:column>
<apex:column headerValue="LastModified Date/Time"> <apex:outputField value="{!list.LastModifiedDate}"/></apex:column>
</apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks in advance,
SK
- SK R.ax1448
- March 13, 2013
- Like
- 0
- Continue reading or reply
Urgent help: Constructor not defined
Hi All,
Getting the following error,can any one help if any idea ?
![]() | Error: Compile Error: Constructor not defined: [System.SelectOption].<Constructor>(Date, String) at line 15 column 29 |
Controller class:
public with sharing class CustomSettingsDemo_CLS{
public String selectedIso {get;set;}
public CustomSettingsDemo_CLS(ApexPages.StandardController controller) {
}
public List<selectOption> fqCodes {
get {
List<selectOption> options = new List<selectOption>();
for (FiscalQuarters__c fq : FiscalQuarters__c.getAll().values())
options.add(new SelectOption(fq.CustomFiscalQuarters__c,fq.Name+' - '+fq.CustomFiscalQuarters__c));
return options;
}
set;
}
}
Using custom setting in the controller class, any help is highly appreciated.
Thanks in advance,
rsk
- satheeshrsk
- October 17, 2012
- Like
- 0
- Continue reading or reply
Formula fields in trigger
Hi All,
Following is the error displayed when i use formula field in trigger:
Error: Compile Error: Field is not writeable: Potential__c.Contact_Status__c at line 5 column 4
trigger updatefield on Potential__c (after insert,after update)
{
for (Potential__c ptl:trigger.new)
{
if(ptl.Contact_Status__c='TRUE')
if(ptl.Opportunity_Stage__C!='CLOSED WON')
ptl.Opportunity_Stage__C='CLOSED WON';
}
}
Kindly advice as to what can be the error.
Many thanks in advance.
- Anidev
- September 08, 2012
- Like
- 0
- Continue reading or reply
How to add custom button to Product related list on Opportunity page
Hi,
I am trying to add a custom button to the Product related list on my Opportunity page. It does not shows any custom buttons section on Product related list. The button type is List Button and the VF page uses standard controller and extension controller class. Any help must be highly appreciated.
Thanks in advance !
- satheeshrsk
- August 17, 2012
- Like
- 0
- Continue reading or reply
How to integrate salesforce with twitter Api
Hi,
Requirement is to get Tweets of my contact/Person account and store it in to salesforce.
Can this be achieved by authentication Twitter API using oauth 1.0
and How.
It's Urgent and i would like the input from you people.Step to step guide if possible
Thanks,
Subham
- Subham
- August 05, 2012
- Like
- 0
- Continue reading or reply
How to integrate salesforce with twitter Api
Hi,
Requirement is to get Tweets of my contact/Person account and store it in to salesforce.
Can this be achieved by authentication Twitter API using oauth 1.0
and How.
It's Urgent and i would like the input from you people.Step to step guide if possible
Thanks,
Subham
- Subham
- August 05, 2012
- Like
- 0
- Continue reading or reply
Twitter Integration
Hi All,
I am trying to connect salesforce to twitter, but when I make callout it throws exception to me:
<error code="53">Basic authentication is not supported</error>
I checked that twitter has turned on the basic authentication, but I am not sure how to call twitter from salesforce now.
My existing code is:
Http h = new Http(); HttpRequest req = new HttpRequest(); req.setMethod('POST'); req.setEndpoint('https://api.twitter.com/1/statuses/update.xml'); req.setHeader('Content-Type','application/x-www-form-urlencoded'); Blob headerValue = Blob.valueOf('username:password'); String authorizationHeader = 'OAuth ' + EncodingUtil.base64Encode(headerValue); req.setHeader('Authorization', authorizationHeader); req.setBody('status=Test Data'); HttpResponse res = h.send(req); system.debug('&&&&&&&&&&&&&&&&7' + res.getBody());
Regards,
R
- RS_Sforce
- March 21, 2012
- Like
- 0
- Continue reading or reply
add Fiscal Quarter picklist field to Opportunities
I am trying to add a date field that would enable my sales team to simply select the fiscal quarter for their Opportunity forecast. I not particularly concerned about the close date or required delivery date.
Is there any way to create a picklist field that would enable us to select the quarter-year (eg, Q4 2010) that would correspond to my company-specific fiscal calendar which I have already entered into Salesforce?
Thanks in advance for any thoughts you have to offer!
- AndrewHk
- August 16, 2010
- Like
- 0
- Continue reading or reply
Add custom button to Product related list
I am trying to add a custom button to the Product related list on my Opportunity page. I have created the button but it does not appear as an option in the page layout. The button is a List type and calls a VF page. The VF page does not use a standard controller.
I successfully created a similar custom button on the Campaign History related list on my Contact page layout. How is this any different?
Any ideas?
Thanks,
Barb
- BARJRD
- May 13, 2010
- Like
- 0
- Continue reading or reply