-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
30Questions
-
23Replies
How to reRender detail section
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
- manjiri
- January 03, 2012
- Like
- 0
- Continue reading or reply
How to get List view Id dynamically
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.
- manjiri
- December 28, 2011
- Like
- 0
- Continue reading or reply
Displaying standard sidebar components on visualforce page
Is it possible to display "Create New", "Recent Items","Search" etc. components on standard salesforce sidebar to custom visualforce page?
- manjiri
- June 04, 2011
- Like
- 0
- Continue reading or reply
parsing CSV by column in apex
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
- manjiri
- May 10, 2011
- Like
- 0
- Continue reading or reply
Problem in sharing objects having multiple lookups
Don't forward a record to the connection that originally shared it. Doing so causes errors when Apex triggers run."
- manjiri
- May 04, 2011
- Like
- 0
- Continue reading or reply
Solution for DML currently not allowed
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?
- manjiri
- March 23, 2011
- Like
- 0
- Continue reading or reply
Show Recent Iem list from standard Homepage on visualforce page
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?
- manjiri
- March 18, 2011
- Like
- 0
- Continue reading or reply
S2S : how to call trigger on target object, when auto accept option is already selected?
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?
- manjiri
- March 15, 2011
- Like
- 0
- Continue reading or reply
Get user's recent Activity list
How can I get User's recent activity list in apex. I want to the show it in vf page.
- manjiri
- March 12, 2011
- Like
- 0
- Continue reading or reply
In operator in SOQl queries
Can we use list of string for 'IN' operator for select statement.
like [Select field1,field2,.. from tablename where id IN stringlist]
- manjiri
- March 11, 2011
- Like
- 0
- Continue reading or reply
Want to show default salesforce "Invalid Date and Time" on vf page
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..
- manjiri
- October 26, 2010
- Like
- 0
- Continue reading or reply
How to check other organization information from apex class in my organization
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..
- manjiri
- August 03, 2010
- Like
- 0
- Continue reading or reply
Calling Microsoft HealthVault webservices through apex
- manjiri
- June 23, 2010
- Like
- 0
- Continue reading or reply
classes in my css overriding by common.css classes
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
- manjiri
- December 23, 2009
- Like
- 1
- Continue reading or reply
How to Add new button on custom object lookup
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
- manjiri
- October 15, 2009
- Like
- 0
- Continue reading or reply
Help required for building custom object relationships
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
- manjiri
- June 30, 2009
- Like
- 0
- Continue reading or reply
Problem in java servlet example - Force.com for Google App Engine for Java: Getting Started
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?
- manjiri
- June 04, 2009
- Like
- 0
- Continue reading or reply
How to make application read only
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
- manjiri
- January 06, 2009
- Like
- 0
- Continue reading or reply
How to write test classes for apex controller method
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
- manjiri
- December 31, 2009
- Like
- 0
- Continue reading or reply
error uploading apex classin a package
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?
- manjiri
- December 30, 2009
- Like
- 0
- Continue reading or reply
classes in my css overriding by common.css classes
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
- manjiri
- December 23, 2009
- Like
- 1
- Continue reading or reply
Test Class order of execution of static block?
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
- S_2013
- October 23, 2013
- Like
- 0
- Continue reading or reply
Adding space between two radio buttons
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
- chiranjeevitg
- September 12, 2013
- Like
- 0
- Continue reading or reply
How to reRender detail section
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
- manjiri
- January 03, 2012
- Like
- 0
- Continue reading or reply
Solution for DML currently not allowed
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?
- manjiri
- March 23, 2011
- Like
- 0
- Continue reading or reply
In operator in SOQl queries
Can we use list of string for 'IN' operator for select statement.
like [Select field1,field2,.. from tablename where id IN stringlist]
- manjiri
- March 11, 2011
- Like
- 0
- Continue reading or reply
Salesforce to Salesforce (S2S) - How to recreate lookup relationship in the target org.
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.
- Saaspert
- January 28, 2010
- Like
- 0
- Continue reading or reply
Problem in java servlet example - Force.com for Google App Engine for Java: Getting Started
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?
- manjiri
- June 04, 2009
- Like
- 0
- Continue reading or reply
How to write test classes for apex controller method
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
- manjiri
- December 31, 2009
- Like
- 0
- Continue reading or reply
error uploading apex classin a package
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?
- manjiri
- December 30, 2009
- Like
- 0
- Continue reading or reply
Adding custom button in a page
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
- manjiri
- December 18, 2008
- Like
- 0
- Continue reading or reply
How to export web services
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
- manjiri
- November 17, 2008
- Like
- 0
- Continue reading or reply
Want to call java code from salesforce
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
- manjiri
- November 12, 2008
- Like
- 0
- Continue reading or reply
Service URL for Salesforce.com webservice API.
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
- manjiri
- September 26, 2008
- Like
- 0
- Continue reading or reply
problem in inserting in a batch when trigger called
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
- manjiri
- August 01, 2008
- Like
- 0
- Continue reading or reply