• manjiri
  • NEWBIE
  • 5 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 30
    Questions
  • 23
    Replies

Hi.... below is the code for a test class I am writing. What I see is that, the static block is being called TWICE instead of once, once ecah time at the beginning of execution of both my test methods. Can anyone plz point out why is his so? i.e. since it is static, it should be loaded only one, when the class itself is loaded isnt it?

 

public class SomeTest {
    
    static someVar=null;
    
    static {
        prepareTestUserData();
    }
    
    static testMethod void method1Test(){
        
        
    }
    
    static testMethod void method2Test(){
        
        
    }
    
    public static void prepareTestUserData() {
        System.debug('I am called');
        //initialization code for someVar
    }
}

 

many thanks

Sankalita

Hi,

 

I need to add space/tab space between two radio buttons. I am passing the values for radio button through controller using <apex:selectOptions>. Please help to resolve this

 

 

Thanks & Regards,

Chiranjeevi T G

I have embedded vf pages in standard layout.

In my vf on some button actions I want to reRender detail page. How can I do that?

I don't want to reload the whole page

 

Thanks,

Manjiri

List<Group> leadQueueRec = [Select Id, Name from Group where Name = 'LeadQueue'];
List<Lead>    leadRec = [Select Id, Name, OwnerId from Lead where Name='James'];
if(leadRec.size() > 0){
    leadrec[0].OwnerId = leadQueueRec[0].Id;
    update leadrec[0];
}   

 

Above snippet of code I am able to run throgh System Log successfully.

But when I am writing same code in one actionFuction It is giving the Exception

DML currently not allowed
System.Exception: DML currently not allowed

 

So I am not getting the reason for this? Does anybody come across same error and knows what is the solution to handle this?

 


Can we use list of string for 'IN' operator for select statement.

like [Select field1,field2,.. from tablename where id IN stringlist]

 

I am establishing S2S between two orgs . Org A (source Org) and Org B (Target Org)

 

Org A has an object (Object1) with look up on the two other objects (Object2 and Object3)

 

Object2 and Object3 are already externally shared with Org B.

 

while sharing Object1 , I am setting parentrecordid to Object2 so Object1 shows up correctly linked to Object2

 

but I am not able link Object1 with both Object2 and Object3 at the same time.

 

here is the code from the after insert trigger on Object1 in Org A.

 

stripped down code...

 

 

            PartnerNetworkRecordConnection newConnection = new PartnerNetworkRecordConnection (
            ConnectionId = networkId,
            LocalRecordId = obj1.Id, 
            ParentRecordId = obj1.obj2);

 

            insert  newConnection;

 

Thanks for your help.

 Hi,

 

I am using following link for trying Google App integration withn Salesforce.

 

http://wiki.developerforce.com/index.php/Force.com_for_Google_App_Engine_Setup_Guide_Java

 

After putting the jars "partner-library.jar ", "wsc-16_0.jar" and "wsc-gae-16_0.jar" in lib path, I have tried to run the servlet "HttpServlet"same code given in the above link.

 

While runningthe servlet I have got following version related error. I am using jdk1.5.0_16

 

Error 500

Bad version number in .class file

RequestURI=/helloSalesforceUser

Caused by:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(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 com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:142)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructor0(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
	at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:306)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
	at org.mortbay.jetty.Server.handle(Server.java:313)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

 

 

 So how can I resolve this. Do I need to use jdk1.6 only?

 

Hi,

Currently I am new, in writing testcases for apex classes.
I want to test the method for apex controller for visualforce page
e.g.public PageReference next()
how can I write test method for this?
Can anybody share the example?

Thanks
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11">Hi,

when I am trying to upload the package, it is giving me following error.

Component Type    Name                    Problem
Apex Class             WebserviceCall    No testMethods found in the selected Apex code for the package

after writing some dummy test method it is giving error as only 0% test coverage, at least 75% test coverage require.
So is it compulsory to write test methods in apex classes?


Thanks..

 

Hi,

I want to add 4/5 custom buttons in a one section of some standard page.
e.g. In Cases Tab -> after clicking on case-number hyperlink, detail page will get open.
I want custom buttons not in Case Details Section. But in other standard/ new section.
So is it possible? If possible can anybody please provide me steps for doing this.

Thanks
I have written some webservice.

e.g following webservice.

global class createWebservice
{
// Pass in the endpoint to be used using the string url
WebService static String getContent()
{
// my code
}
}

How can I use this webservice from external application. I mean how I can call this webservice from external application?

Thanks
HI,

I want to call API's from some site, I can call them through java code. So I want to display the result on Salesforce may be on visualForce page. So should I need to make my java code as webservice? and call it through apex controller?
If yes? Is there any example which I can refer? Which version of AXIS I should use?
or is there any other way to work for above problem?

Thanks

Hi,

I am testing one tool for salesforce connector.
It is asking Service URL for Salesforce.com webservice API as input.
So please tell me what should I give here.

Thanks & Regards,
Manjiri Yatnalkar

Hi,

I am able to add records in salesforce object one by one  when the trigger is enabled.
But I am not able to add records in salesforce object in batch when the trigger is enabled.
So is it possible to work with both or there is other workaround?

Thanks,
Manjiri