• Sean_k
  • NEWBIE
  • 5 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 22
    Questions
  • 13
    Replies
Can I have my own Custom Visualforce HOME page?. I mean I would like to be landed in a custom page immediately after logging into the salesforce.
If it is possible, how can I do that?
 
Thanks,
Sean


Message Edited by Sean_k on 02-04-2008 01:13 PM
  • February 04, 2008
  • Like
  • 0
Hi,
I developed a small method using Apex to query opportunity object based on account id.
Apex class looks like the following
 
global class OpportunityInfo
{
 webService static Opportunity[] getOpportunityInformation(String accountId)
 {
  Integer x=0;
  Opportunity[] opportunityResults = new Opportunity[]{};
  for(Opportunity[] oppArray : [Select o.Name, o.Close_Date__c, o.OwnerId, o.Owner.Name from Opportunity o where o.AccountId = :accountId order by  o.Close_Date__c desc LIMIT 10000])
  {
   for (x=0; x < oppArray.size(); x++)
   {
    opportunityResults.add(oppArray[x]);
   }
  }
  System.debug('getOpportunityInformation web service found [' + opportunityResults.size() + '] Opportunity records ');  
  return opportunityResults; 
 }
 static testMethod void getOpportunitiesTest() {
  getOpportunityInformation('0017000000Lfw1sAAB');
 }
}
 
when I run the UnitTest using the RunTest button, It says the query got 0 records. But there few Opportunities for this Account.
Here are the test results:
 
 *** Beginning Test 1: OpportunityInfo.static testMethod void getOpportunitiesTest()
20080109204034.774:Class.OpportunityInfo.getOpportunityInformation: line 9, column 6: SelectLoop:LIST:SOBJECT:Opportunity
20080109204034.774:Class.OpportunityInfo.getOpportunityInformation: line 9, column 35: SOQL query with 0 rows finished in 8 ms
20080109204034.774:Class.OpportunityInfo.getOpportunityInformation: line 16, column 6: getOpportunityInformation web service found [0] Opportunity records
20080109204034.774:Class.OpportunityInfo.getOpportunitiesTest: line 22, column 9: returning LIST:SOBJECT:Opportunity from method webService static LIST:SOBJECT:Opportunity getOpportunityInformation(String) in 9 ms
20080109204034.774:Class.OpportunityInfo: line 20, column 28: returning from end of method static testMethod void getOpportunitiesTest() in 9 ms
Cumulative resource usage:
Resource usage for namespace: (default)
Number of SOQL queries: 1 out of 100
Number of query rows: 0 out of 500
Number of DML statements: 0 out of 100
Number of DML rows: 0 out of 500
Number of transaction control statements: 0 out of 0
Number of script statements: 6 out of 200000
Maximum heap size: 0 out of 500000
Number of callouts: 0 out of 10
Number of Email Invocations: 0 out of 10
Total email recipients queued to be sent : 0
*** Ending Test OpportunityInfo.static testMethod void getOpportunitiesTest()
 
This code is tested in Enterprise Edition(Sandbox).
I tested In Developer Edition this works fine
 
Is there anything I am missing in EE?
 
Thanks,
Sean
 
 


Message Edited by Sean_k on 01-09-2008 01:45 PM
  • January 09, 2008
  • Like
  • 0
I have a reqirement where I need to prepopulate the Solution Details (Textarea) when the user clicks on "Close Case" button on Case details page.
I have overriden the Close Case button to show some predefined Solutions . User selects one of the solutions and  clicks on continue button to go to
Close Case. At this moment the "Solution Details" will be prepopulated with the solution that user chose.
I implemented like the following
https://na3.salesforce.com/50050000003UY9f/s?retURL=%2F50050000003UY9f&solNote=mybigmessage
which is working fine.
Now my question is there a way to avoid to send the message through URL as there is a URL charecter limitation, like submitting with POST method?
I am using ajax9.0
 
Any help would be greatly appreciated.
Regards,
Sean
  • August 16, 2007
  • Like
  • 0
I am developing a Ajax scontrol(Report) where I show next 100/50/25 days Events.Customer is asking for pagination as there are thousands of events.
Could some body please provide guidelines or samples for the best practices to use.
Thanks,
Sean
 
Is Apex Data Loader 9.0 Open source? If  so  where is the source code available?
I searched the forums but with same type of question, but nobody answered it.
Benji please can you?
 
Thanks,
Sean
  • April 17, 2007
  • Like
  • 0
We are using Commons axis 1.1 and http-client 2.0 for our integration application.As Salesforce is stopping support for (SSLv2 and SSLv3 and TLSv1 with key lengths less than 128 bits)  from March 31, does this effect our Integration application. How do I know which protrocol my application is using?
Thanks,
Sean
  • March 29, 2007
  • Like
  • 0
The screens are turning black and white and all icons are missing when the user comes back to salesforce pages after using the .net scontrol.
Please somebody suggest whats going on here?
 
Thanks
Sravan
  • September 27, 2006
  • Like
  • 0
How can Implement a dependent picklist using C#?
I would appreciate if somebody can explain with a example.
 
Thanks
Sean
  • September 11, 2006
  • Like
  • 0
Is there a way to know expiration  login password in advance through API.I would like to programatically  notify(email) the related person(s) 5/10 days in advance, so they can take some action.
 
Thanks
Sean
Hi Simon,
I saw that you implemented  CommonsHTTPSender  for SFDC using Axis.
Could provide me some guidelines or resources to implement Same kind of class(connection persistence,compression of soap messages etc ) using websphere SOAP Api.
Please do not point me to Projects&toolkits (http://www.salesforce.com/developer/projects_toolkits.jsp)  there is nothing related to websphere or partner API(7.0)
Thanks
Sean

Message Edited by Sean_k on 06-15-2006 08:40 AM

When I generate Java classes usning WSDL2java of axis1_2_1 there are lot of classes missing(which are starting with _(underscore)) that were generated by using axis1.1.
I am using java 1.4.2_08 version.
Some of the classes that are missing under com\sforce\soap\partner are
 
_AssignmentRuleHeader.java
_CallOptions.java
_convertLead.java
_convertLeadResponse.java
_createResponse.java
_delete.java
_deleteResponse.java
_getDeleted.java
_getDeletedResponse.java
_getServerTimestamp.java
_getServerTimestampResponse.ja
_getUpdated.java
_getUpdatedResponse.java
_getUserInfo.java
_getUserInfoResponse.java
_MruHeader.java
_query.java
_queryMore.java
_queryMoreResponse.java
_QueryOptions.java
_queryResponse.java
_resetPassword.java
_resetPasswordResponse.java
_retrieve.java
_retrieveResponse.java
_search.java
_searchResponse.java
_SessionHeader.java
_setPassword.java
_setPasswordResponse.java
_update.java
_updateResponse.java
_upsert.java
_upsertResponse.java
 
Am I missing something?
 
Thanks
Sravan
 
 
 
 
Are there any partner Samples(for API 7.0) available for websphere 6.0?
I found some old(API 4.0..) examples but they are with Enterprise WSDL.
I generated Java classes by using Websphere WSDL2java.bat,but some classes are missing which are generated by axis WSDL2java.
Could somebody point me to some useful articles or examples.

Thanks
Sean
Hi I downloaded Jsp Samples form sforce.com,and unzipped in to
tomcat/webapps/sforce.
when i typed http://localhost:8080/sforce/ in browser url it is showing up the index.jsp,
but when I click on Sample 1: Web2Lead or Sample 2: Lead Qualification / WebLink Example
links iam getting the following error
exception
javax.servlet.ServletException: org/apache/tools/ant/BuildException
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause
java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
 org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:197)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:508)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

what could be the reason?
I tried by setting ant.jar in the classpath but it doesn't help.I am wondering why does it need ant
to compile Jsp pages?
 
Thanks
Sean

Message Edited by Sean_k on 05-31-2006 10:31 AM

I am getting the following error message when i tried to gnerate Java classes from  the partner WSDL by using the AXIS's WSDL2java (java org.apache.axis.wsdl.WSDL2Java partner.xml)
 
- Unable to find required classes (javax.activation.DataHandler and javax.mail.i
nternet.MimeMultipart). Attachment support is disabled.
 
JDK is 1.5.0_06-b05
AXIS (Got the message both with 1_2_1 and 1_3)
 
i have the folloing libraries in the classpath
 
axis-ant.jar
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
log4j-1.2.8.jar
saaj.jar
wsdl4j-1.5.1.jar
 
I never got this with with  6.0 api iam getting only with 7.0
 
Is anything missing in my classpath?
 
Thanks
Sean
 
 
 
I have a custom Scontrol which does some calculations and populate some custom fields,and there is no User interface involved in this.
I would like to execute this Scontrol periodically with no user involvement.Is there a way to do it?
Or Is there a way/API to execute(invoke) this Scontrol from Java Code.
If yes is it a good practice to do it.
 
 
Thanks
Sean
  • March 14, 2006
  • Like
  • 0
Does the AppExchange Data Loader implement the Upsert feature of API 7.0 yet?

Thanks
Sean
  • February 17, 2006
  • Like
  • 0
Question 1)
Iam trying to get data from salesforce custom object which has more than a million records.
I got the following error.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketTimeoutException: Read timed out
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.net.SocketTimeoutException
: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:631)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:141)


in CommonsHTTPSender

httpClient.setConnectionTimeout(5000);
httpClient.setHttpConnectionFactoryTimeout(5000); methods
i changed time from 5000 to 10000 still it didn't help?
Question 2)
Everybody on the forum saying "Make sure you're using HTTP/1.1 persistent connections".
How do I know which HTTP I am using? How can I implement HTTP/1.1..
Right now the Http class(CommonsHTTPSender) I am using is copied from the Quickstart examples.

Please help..this is urgent..
  • January 31, 2006
  • Like
  • 0
Hi iam working on a salesforce loader where it involves millions of records to be
inserted/updated/deleted.
With my current design it is taking too much time to load data.I am planning to use Java Threads to
upload records.Can anybody point me to a good example how to create multiple sessions and access them from the
threads.I have gone through the Sforce data loader code but it seems like it is not using the threads.

Thanks
Sean
  • January 30, 2006
  • Like
  • 0
Hi,
I have two login accounts with sforce.One is for Production and another is for testing.I created lot of
custom objects and fields in test environment(sforce).Now i would like to create same schema on production
how can i copy/move/create the same schema on production with out creating it manually one by one.
Is there any quick solution.

Thanks
Sean
  • January 12, 2006
  • Like
  • 0
Hi I was trying to build the Data loader by using the build file.I set the values in build.properties file also,but iam getting the following error

[axis-wsdl2java] java.lang.NoSuchMethodError: org.apache.axis.enum.Scope.getScop
e(Ljava/lang/String;Lorg/apache/axis/enum/Scope;)Lorg/apache/axis/enum/Scope;
[axis-wsdl2java] at org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask.execu
te(Wsdl2javaAntTask.java:207)
[axis-wsdl2java] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:275)
[axis-wsdl2java] at org.apache.tools.ant.Task.perform(Task.java:364)
[axis-wsdl2java] at org.apache.tools.ant.Target.execute(Target.java:341)
[axis-wsdl2java] at org.apache.tools.ant.Target.performTasks(Target.java:
369)
[axis-wsdl2java] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1216)
[axis-wsdl2java] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1185)
[axis-wsdl2java] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:40)
[axis-wsdl2java] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1068)
[axis-wsdl2java] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[axis-wsdl2java] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[axis-wsdl2java] at org.apache.tools.ant.launch.Launcher.run(Launcher.jav
a:246)
[axis-wsdl2java] at org.apache.tools.ant.launch.Launcher.main(Launcher.ja
va:67)

However iam not using the Perl version of ant.
  • December 29, 2005
  • Like
  • 0
I am developing a Ajax scontrol(Report) where I show next 100/50/25 days Events.Customer is asking for pagination as there are thousands of events.
Could some body please provide guidelines or samples for the best practices to use.
Thanks,
Sean
 
Please Help....
I am getting the error "object expected" on line in red. What I have to do to fix it?
 
====================================================
<html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script>
<script language="javascript">
function do_code()
{
sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_70}", false);
var accountid = "{!TH_Distributor_Recap__c.DistributorId__c}";
var thdist = "{!TH_Distributor_Recap__c.Id}";
var qrdr = sforce.connection.query("Select BillingStreet, BillingCity, BillingState, Distributor_Type__c from Account where id = '" + accountid + "'");        
var records = qrdr.getArray("records");
alert(records.length);
alert(thdist);
for (var i = 0; i < records.length; i++)
{
tt = records[i];
var BillingStreet=tt.get("BillingStreet");
var BillingCity = tt.get("BillingCity");
var BillingState= tt.get("BillingState");
var Distributor_Type__c= tt.get("Distributor_Type__c");
}
alert(BillingStreet);
alert(BillingCity);
alert(BillingState);
alert(Distributor_Type__c);
///////////////////// update item//////////////////////////////////////////////
var thUpdate = new Array();
alert("1 - So far so good");
var thObject = new sforce.DynaBean("TH_Distributor_Recap__c");
alert("2 - So far so good");
thObject.set("Id", thdist);
thObject.set("Distributor_Address__c", BillingStreet);
thObject.set("Distributor_City__c", BillingCity);
thObject.set("Distributor_State__c", BillingState);
thObject.set("Distributor_Type__c", Distributor_Type__c);
thUpdate.push(thObject);
var update = sforceClient.Update(thUpdate);
parent.location.href = "{!TH_Distributor_Recap__c.Link}";
//////////////////////////////////////////////////////////////////////////////////////////
}

</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body onLoad="do_code();">
</body>
</html>
Hiring for new Salesforce.com SFA/Marketing automation solution. Prototype complete and up on AppEx. Need both short and long term technology resources including administrators, developers and programmers. Short term project assignments and full time positions available. Prefer San Francisco location. Will consider partnering. Send resumes to info(at)vsente.com

Need a developer, to finish a Shipping Calculator for Salesforce.com integration.

AJAX preferred

Please call 888.835.5668
When I generate Java classes usning WSDL2java of axis1_2_1 there are lot of classes missing(which are starting with _(underscore)) that were generated by using axis1.1.
I am using java 1.4.2_08 version.
Some of the classes that are missing under com\sforce\soap\partner are
 
_AssignmentRuleHeader.java
_CallOptions.java
_convertLead.java
_convertLeadResponse.java
_createResponse.java
_delete.java
_deleteResponse.java
_getDeleted.java
_getDeletedResponse.java
_getServerTimestamp.java
_getServerTimestampResponse.ja
_getUpdated.java
_getUpdatedResponse.java
_getUserInfo.java
_getUserInfoResponse.java
_MruHeader.java
_query.java
_queryMore.java
_queryMoreResponse.java
_QueryOptions.java
_queryResponse.java
_resetPassword.java
_resetPasswordResponse.java
_retrieve.java
_retrieveResponse.java
_search.java
_searchResponse.java
_SessionHeader.java
_setPassword.java
_setPasswordResponse.java
_update.java
_updateResponse.java
_upsert.java
_upsertResponse.java
 
Am I missing something?
 
Thanks
Sravan
 
 
 
 
Question 1)
Iam trying to get data from salesforce custom object which has more than a million records.
I got the following error.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketTimeoutException: Read timed out
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.net.SocketTimeoutException
: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:631)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:141)


in CommonsHTTPSender

httpClient.setConnectionTimeout(5000);
httpClient.setHttpConnectionFactoryTimeout(5000); methods
i changed time from 5000 to 10000 still it didn't help?
Question 2)
Everybody on the forum saying "Make sure you're using HTTP/1.1 persistent connections".
How do I know which HTTP I am using? How can I implement HTTP/1.1..
Right now the Http class(CommonsHTTPSender) I am using is copied from the Quickstart examples.

Please help..this is urgent..
  • January 31, 2006
  • Like
  • 0
Hi,
I have two login accounts with sforce.One is for Production and another is for testing.I created lot of
custom objects and fields in test environment(sforce).Now i would like to create same schema on production
how can i copy/move/create the same schema on production with out creating it manually one by one.
Is there any quick solution.

Thanks
Sean
  • January 12, 2006
  • Like
  • 0
Hi
I am Querying CustomObject__c.
If i set Where clause on Name Field it workds fine ... But if i set Where Clause to myCustomField__c It executes the Query (query.isDone() is TRUE) . But throws NullPoiterException on queryResult.getRecords()

Name and myCustomField have the same values.

what is the best practice to Query a CustomObject__c ??

here is the TWo differnt Codes i am using ...

NO ERRORS Query:
query("select Area_ID__c, Service_ID__c from UserService__c where Name='"
+ name + "'");

NULLPOINTER QUERY:
query("select Area_ID__c, Service_ID__c from UserService__c where myCustomField ='"
+ name + "'");
  • January 03, 2006
  • Like
  • 0
Hi,
I created a custom object called myAccount on sforce,and programatically inserted some data.when i tried to display the data i got A Nullpointer exception at
qr.getRecords(i).getId().getValue();

I did not create any feild with name Id,but my understanding is id is a implicite feild.

I created the Record Name:Account_key with data type Auto Number and display type {0}
is it causing any problem?

Thanks
Sean
  • December 22, 2005
  • Like
  • 0

Please bear with my noob question:

I installed Axis, import enterprise.wsdl, then I copied Samples.java from \EnterpriseSamples4_0\EnterpriseSamples\src\com\salesforce\samples to my working directory.

I try to compile Enterprise Samples4.0 using "javac Samples.java" and it went fine. I got "Samples.class" file but I can't run it. I got following error:

D:\My Documents\SalesForce>java Samples
Exception in thread "main" java.lang.NoClassDefFoundError: Samples (wrong name:
com/salesforce/samples/Samples)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

I appreciate for any comments.

BTW, I can run "QuickStart4_0" sample using the batch file, but if I compiles quickstart.java and try to run it, I got the same error.

 

Can I include more than one file in an sControl?
  • November 13, 2003
  • Like
  • 0