• manjiri
  • NEWBIE
  • 5 Points
  • Member since 2008

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

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

I want to create different views of custom objects and in different criterias I want to show specific views.

I have tried following line. but if I put any string in id, it is showing same result

<apex:enhancedList type="Test__c" height="300" rowsPerPage="10" id="ABC" /> 

The discription for this attribute is

 

The database ID of the desired list view. When editing a list view definition, this ID is the 15-character string after 'fcf=' in the browser's address bar. This value is required if type is not specified.

 

How can I get this id.

 

Is it possible to display "Create New", "Recent Items","Search" etc. components on standard salesforce sidebar to custom visualforce page?

 

Hi,

 

I want to do CVS parsing. I got following link for parsing csv

http://wiki.developerforce.com/index.php/Code_Samples#Parse_a_CSV_with_APEX

 

But in my application i have requirement like I want to parse csv by columns.

i.e something like if file1 has col1, col2, col3, col4, col5

I want to make file2 with col1, col2, col3 from file1

(Similar to something as grep in unix)

So is there any way to do this in apex? Anybody tried this?

 

thanks,

Manjiri

 

I have established lookup relationship by standard way.
I have 3 objects obj1, obj2, obj3. And obj1, obj2 are lookup fields in obj3
And it is working fine when i am manually creating objs obj1, obj2 and obj3 in my org1, it is getting created in org2.
But in my application there is need for criteria based sharing. So I have written trigger.
In that I am first creating obj1, obj2 which are lookup fields in obj3.
But when i am running trigger I am getting exception System.DmlException: Insert failed. First exception on row 0; first error: INVALID_PARTNER_NETWORK_STATUS,
When i search help for this exception it is said
"Attempting to forward a record from an object to which the connection is not subscribed results in an Invalid Partner Network Status error.

Don't forward a record to the connection that originally shared it. Doing so causes errors when Apex triggers run."

 

In connections my number of fileds subscribed and published are same. So i am not getting why this error is coming.
I have also tried it with apex script, but same exception I am getting.
Anyone come across the same issue? Any pointer/ solution will be appreciated.
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?

 


How can I show "Recent Items " list on standard homepage to my custom visualforce page? Is there any way to do this using standard controllers?

 

Hi,

 

I am sharing 2 objects throgh S2S.

One object say obj1 I am publishing through org1 and subscribing in org2

One object say obj2 I am publishing through org2 and subscribing in org1

 

for obj1, In org2, I have selected auto accept option.

Based on some field in obj1, i want to fire query on obj2 and then want to publish obj2 to org1.

So for this purpose i am writing trigger After Insert on obj1, But when accepting record with auto option this trigger is not getting called. So is there any workaround for this?

 

 

How can I get User's recent activity list in apex. I want to the show it in vf page.

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

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

 

Hi,

 

In vf page I am using <apex:inputField> for date objects.

when I am entering some string in those fields and then trying to save, on some pages it is showing default salesforce message "Invalid Date and Time". But sometimes it is not showing the message.

I have checked the debug logs. In both the cases it it showing VF_PAGE_MESSAGE|Invalid Date and Time.

So I am not getting, why it is not showing in some cases. 

Does anyone come across issue like this?

 

Thanks..




 

       

Hi,

 

I want to login to other salesforce organization and check wheather particular vf page exist or not on that org.

If present i want to redirect to that page on that org. Else want to show error page on my org.

I want to write the code in my Apex class.

For login I have used REST call. Configured https://login.salesforce.com in remote site settings.

Following is my code for login.

 

        HttpRequest req = new HttpRequest();
        req.setMethod('POST');
        req.setEndpoint('https://login.salesforce.com/?un='+userName+'&pw='+password+'&startURL=/apex/ABCPage');
       
        Http http = new Http();
        PageReference p;       
   
        try {
            HTTPResponse res = http.send(req);   
            showError = true;

            if(res.getStatusCode()== 302)
            {
                p = new PageReference('https://login.salesforce.com/?un='+userName+'&pw='+password+'&startURL=/apex/ABCPage');           
                showError = false;
            }

        } catch(System.CalloutException e) {
            //Exception handling goes here....
             System.debug('In catch '+e);           
        }

I don't know is it a right way? Please let me know if any other alternative possible? i am able to login and show that page using this code.

 

Same way is it possible to call Metadata API? Is there any endpoint available?

Or is there any other way to check if particular vf page i.e 'ABCPage' exist or not on other org through Apex code in my org?

 

i can get list of page in my org using

List<ApexPage> lstPages = [Select id, name from ApexPage];

Is there any way to get this list for other org?

 

Thanks..

 

Hi, Anybody worked on calling Microsoft HealthVault webservices throgh apex. If any sample code available, please share the link. Thanks.. Manjiri

Hi,

 

I was using following statement to include my stylesheet in visualforce page.

<apex:stylesheet value="{!$Resource.MyStyle}/MyStyleSheet.css" />

 

when the page is loaded it will show the proper styles in my css, but after performing some ajax action event, some classes in my css are overriding by common.css style classes.

 

e.g I am using some btnStyle class for command button, after performing some action, image changes on button.

when I inspect element for that button class will be shown as btn btnStyle class. btn class is class from common.css in salesforce.

  

I have solved this problem using below line
<link rel="Stylesheet" type="text/css" href="{!$Resource.MyStyle}/MyStyleSheet.css" />

 

So actually I want to understand which is the standard way to include stylesheet in visualforce page.

Thanks  

Hi,

 

In lookups for standard object, we have New button on lookup dialig.

Is it possible to have New button on lookup dialog for Cutom Object. If yes please let me know the steps or workaround

 

Thanks

Hi,

 

I am converting SQL database to custom objects.

In typical SQL database  there are many columns referring to Id in some other table. They have one-to-one   relationships with that table. But in salesforce we can not have one-to-one relationship. So what will be the possible workaround?

Are there any Best practices to use? Is there any guide for designing?

Writing triggers and checking is one way I found, but it is again long way if there are many objects in the system.

So if anybody worked on similar kind of thing please help.

 

Thanks

 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,

I want to prepare Test Drive for deploying application on AppExchange.
Test Drive should be read-only version of the application.
So what all the settings are required for making application read-only?

Thanks

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 was using following statement to include my stylesheet in visualforce page.

<apex:stylesheet value="{!$Resource.MyStyle}/MyStyleSheet.css" />

 

when the page is loaded it will show the proper styles in my css, but after performing some ajax action event, some classes in my css are overriding by common.css style classes.

 

e.g I am using some btnStyle class for command button, after performing some action, image changes on button.

when I inspect element for that button class will be shown as btn btnStyle class. btn class is class from common.css in salesforce.

  

I have solved this problem using below line
<link rel="Stylesheet" type="text/css" href="{!$Resource.MyStyle}/MyStyleSheet.css" />

 

So actually I want to understand which is the standard way to include stylesheet in visualforce page.

Thanks  

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

  • October 23, 2013
  • Like
  • 0

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

  • September 26, 2008
  • Like
  • 0
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