-
ChatterFeed
-
59Best Answers
-
4Likes Received
-
0Likes Given
-
169Questions
-
722Replies
HttpRequest with https!
Hi everyone,
I'll use the HTTP Request object to POST data to an HTTPS endpoint.
Please let me know if you have some important points.
Thanks,
Seiji
-
- SkyBlue2007
- April 22, 2011
- Like
- 0
- Continue reading or reply
Google Analytics - _gaq.push() method
We are using Google Analytics in one of our Sties. We've added the google analytics standard component tag to the bottom of each of our VF pages:
<site:googleAnalyticsTracking />
We are trying to get a more granular level of analytics tracking for some search result links. We have a datatable that iterates over a returned list of search results. Within each result we have a couple of links we'd like to track. Is it possible to use the javascript _gaq.push() method to capture data on when these links are clicked and pass the appropriate information into Google Analytics? Can you use merge field syntax to pass the data into the method?
<apex:outputLink value="http://{!cont.Website__c}" onClick="_gaq.push(['_trackEvent', 'Category', 'Action', 'Label']);">
How would you use merge field syntax to pass in the appropriate data?
Has anyone done this? Is it possible?
Thanks for any help.
-
- bohemianguy100
- April 17, 2011
- Like
- 0
- Continue reading or reply
Cookie is not getting created after Apex Callout
Hi Everyone,
I am trying to consume some apis in salesforce thier authentication approach is as follows -
When we send an HTTP login request to the given endpoint with the usename and password header following items are expected to return -
1. A session cookie, jsessionid. The client must use this cookie when submitting subsequent requests, including logoff requests.
2. A status code of 200, if the session does not encounter any errors. This indicates that the request succeeded.
The problem is that when I tried this api call using Apex callout, it returned status code of 200 but no cookie with the name 'jsessionid' is created. However i tried this API call using XMLHttpRequest object it works fine.
Please let me know if somebody knows the issue.
Thanks,
Lakhan
-
- Prajapati.Lakhan
- March 31, 2011
- Like
- 0
- Continue reading or reply
Can not delete Apex Classes from Organization
I am trying to clean up old code and trying to delete old APEX classes but I do not see del/edit button for those APEX classes.
Any idea ?
Thanks in advance
-
- rajahm
- March 28, 2011
- Like
- 0
- Continue reading or reply
collaspe code in eclipse using force.com ide
Hello,
Does any one know how to use code folding/collasping in eclipse similar to how Visual Studio or Notepad++?
-
- johutch
- February 05, 2011
- Like
- 0
- Continue reading or reply
Sites Secure URL
Sites Explanation:
We have a sites project which is public. The public access settings allow our end-users to login via a guest license and enter their information (no authentication).
Sites URL Setup:
Default URL: http://something.force.com/xyzenrollment
Secure URL: https://something.secure.force.com/xyzenrollment
Custom Web Address: http://enroll.something.com
The Issue:
The Site is not secure. All information entered via the Site by our end-users needs to be secure (i.e. currently http, needs to be https).
Question:
How do I point the users to the Secure URL vs. the Default URL while still keeping the Custom Web Address masking? I changed the Administration Setup > Security Controls > Session Settings > Require secure connections (HTTPS) to checked, but this does not seem to do the trick.
-
- Markey1
- January 27, 2011
- Like
- 0
- Continue reading or reply
Force.com Sites with Chatter
Hi,
Can we use Chatter feature in Force.com sites?
I tried using Syndication Feed but was not able to display anything... It takes me to an authorization error page..
Also , I want Users to even write feeds through Sites..
Is this possible?
Thanks,
Shruti
-
- Shruti
- January 27, 2011
- Like
- 0
- Continue reading or reply
Lag time between Force.com Site and Visualforce Changes
Anyone ever notice that if you change your VF Page, and then look at the VF Page in your browser inside your org via URL/apex/pageName the changes show up, but it sometimes takes a few minutes to show up on your force.com site?
<Seinfeld voice>What's the deal with VF Page refreshes in Sites? Is it updated or what?</voice>
But seroiusly, anyone notice this when debugging sites and have any tips on this? Other than trying to clear your history.......
-
- Cory Cowgill
- January 26, 2011
- Like
- 0
- Continue reading or reply
New Licensing Scheme for Salesforce Sites
I would like to know if the licensing scheme for Salesforce sites changed after the Dreamforce 2010. I need to develop a mass site for many authenticated users (10000 and more for 2012), however, it is impossible to pay a license for each user, doing impossible to use the Salesforce platform. Specifically I would like to know if a new licensing scheme, based on computational load (CPU, Storage, Networking, etc) more than in a license by each authenticated user, has been proposed.
Thanks by your answers.
-
- mjvc007
- January 17, 2011
- Like
- 0
- Continue reading or reply
Auto-refresh dashboard with vpage hack
Folks,
I'm trying to have my dashboard automatically refresh using a visualforce page db component.
I have seen a s-control hack which does something what I want, but would rather use visualforce.
Any ideas why this doesn't work
<apex:page > <html> <head> <script> function onload() { window.parent.location.replace('/{!$CurrentPage.parameters.id}'); } </script> </head> <body onLoad="setTimeout('onload()', 5000)"> <p>Refreshing.....</p> </body> </html> </apex:page>
-
- MikeGill
- January 10, 2011
- Like
- 0
- Continue reading or reply
Multiple headers in HttpRequest?
Quick question. If want to perform an HttpRequest but need to pass multiple headers...how do I do that?
request.setHeader('API-KEY', APIKEY);
request.setHeader('ACCEPT', 'text/xml');
Does line 2 overwrite line 1?
-
- doubleminus
- November 11, 2010
- Like
- 0
- Continue reading or reply
What is APEXP?
Hi there!
I wondering what the apexp extension means.
I have seen some apps referring to an unknown URL. For example:
https://na?.salesforce.com/nexpath/nexpathmembers.apexp?id=a0?A0000002abc1&retURL=/a0?A0000002abc1
What is nexpath? A namespace prefix?
What is nexpathmembers.apexp? I don't see any VF page with that name. In fact, there is no VF at all.
Thanks, JDL
-
- jdl2010
- November 05, 2010
- Like
- 0
- Continue reading or reply
How to delete/inactivate classes in Production Instance
Hi,
We have some apex classes that have been deployed 3 years back without test classes.
Our production organization Now has exactly 75% code coverage( when i ran ALL APEX TEST Classes).
I have created a new trigger which needs to be deployed to the production. When trying to deploy the trigger and Its test class via Force.com IDE, it raises a error saying overall code coverage is 73%.
Now i want to deactivate/delete those apex classes that do not have test classes written.I do not know that why they have written and they are no longer used.
How can i accomplish this task of deactivating/deleting..
I tried searching the posts, but could not get a definitive way to accomplish this.
Any help or idea on this is highly appreciated.
Thanks,
Sales4ce
-
- sales4ce
- October 12, 2010
- Like
- 0
- Continue reading or reply
Visualforce for iPhone Development
We are building a Visualforce page that will work with Salesforce.com mobile on the iPhone. Our users are going to be in rural and remote areas so we need a VERY light visualforce page. Right now when we build a VF page with this code it produces includes to three or more JavaScript files and makes the download of the page REALLY slow over low bandwidth.
<apex:page controller="CreateOrder" showheader="false" sidebar="false" standardStylesheets="false" action="{!checkPermission}"> <!DOCTYPE HTML> <meta content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
What can I do to eliminate much of the JavaScript to make the page lighter? Here is what results from the pages above.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML> <html><head><script src="/faces/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.AjaxScript" type="text/javascript"></script><script src="/static/060710/js/functions.js" type="text/javascript"></script><script src="/jslibrary/1281554859000/main.js"></script><script src="/jslibrary/labels/1284058836000/en_US.js" type="text/javascript"></script><script src="/static/060710/desktop/desktopAjax.js" type="text/javascript"></script></head> <meta content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
Thanks for any ideas!
Pat
-
- Pat McQueen
- September 17, 2010
- Like
- 0
- Continue reading or reply
Robots.txt is not available in Domain
Hi
I have prepared a site http://nbcuni.force.com/commops
My Force.com domain name is nbcuni.force.com
I have prepared a robots.txt file (VF page which allows all bots) and uploaded it in Site Robots.txt.
That robots.txt is visible at http://nbcuni.force.com/commops/robots.txt infact it should be visible at http://nbcuni.force.com/robots.txt (in domain)
In Google Webmaster tools the bot crawls at http://nbcuni.force.com/robots.txt and are unable to find the file hence give crawl error (503)
How to get Robots.txt at the http://nbcuni.force.com/robots.txt
-
- dev401has
- September 02, 2010
- Like
- 0
- Continue reading or reply
Warning message presented, even for new and empty apex class definitions
The following warning is frequently shown to me regardless of the file I'm looking at;
Warning: The element type "param" should be terminated by the matching end-tag "". at line 82
I get this, even where there is no content in the current file. For example, I went to create a new APEX class, and this warning is presented with the empty class in the Apex Class Edit dialog. As such, its surprising to me that I see the error without a reference to the offending code file. Any ideas on what this warning is, and how best to track it down?
-
- Aiden
- August 20, 2010
- Like
- 0
- Continue reading or reply
Callout Limits within Batch Apex?
Does the below limit....
'A single Apex transaction can make a maximum of 10 callouts to an HTTP request or an API call.'
Apply within a batch transaction? For instance if I can write the batch to iterate on 10 records at a time, will I be able to get by this limit? Really unfortunate if not.
Thanks for any direction.
-
- nwing
- August 12, 2010
- Like
- 0
- Continue reading or reply
-
- Ankit Arora
- July 20, 2010
- Like
- 0
- Continue reading or reply
Open a JQuery Dialog in Standard Account Page
Hi there.
I need some help, I want to open a JQuery Dialog in Standard Account Page.
-Ram
-
- Ram Vaidyanathan
- July 11, 2010
- Like
- 0
- Continue reading or reply
Showing a vf page on home screen
I created a VF page that I'd like to display on my homescreen.
I've tried to use iframes and an html component, it looks ok in the preview, but then is cut off when I view it on the screen, here's the code and what it looks like:
any ideas?
<br><iframe src="/apex/ParalegalBreakdown" width="50%" height="100%"></iframe></br>
-
- chriseustace
- July 09, 2010
- Like
- 0
- Continue reading or reply
Bug: Portal CSS is included in Sites pages if the site is login-enabled
Doing a project for a customer, and they have a login-enabled site. We're trying to use the Public Knowledge Base AppExchange package with this site, but the CSS keeps having issues. In doing some research and reviewing the generated HTML for the pages, it's apparent that the Site is including the following snippet in every page if the site is login-enabled. This is not including the fact that the user is still anonymous when browsing as well (the anonymous users are being forced to inherit this CSS as well).
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/elements.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/common.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195879000/PortalDefault/gc/dStandard.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195879000/PortalDefault/00DV00000000Uh4/00530000004j8Yx/gc/dCustom0.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/extended.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320352245000/PortalDefault/00DV00000000Uh4/060V0000000D0Ua/gc/portal.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/setup.css" rel="stylesheet" type="text/css" />
How do I make it so that this is not happening? We include these attributes in all the VF pages and templates for the Site:
- showHeader="false"
- sidebar="false"
- standardStyleSheets="false"
But it doesn't seem to respect that if the site is login-enabled. When I disable the login functionality for the site, teh CSS fo rthe portal is not included, but other standard CSS is.
Has anyone run into this with Sites, and if so, how do you overcome it?
-
- paul-lmi
- November 03, 2011
- Like
- 0
- Continue reading or reply
Bug in IDE when doing API-based actions on Windows platforms
-
- paul-lmi
- February 02, 2011
- Like
- 0
- Continue reading or reply
Huge discrepancy in Salesforce reported pageviews vs. reality
-
- paul-lmi
- January 29, 2011
- Like
- 1
- Continue reading or reply
Cannot have more than 10 chunks in a single operation
What does this error message actually mean? We're seeing it in some test code exceptions when trying to deploy new code.
System.TypeException: Cannot have more than 10 chunks in a single operation. Please rearrange the data to reduce chunking.
-
- paul-lmi
- January 26, 2011
- Like
- 0
- Continue reading or reply
Pulling DataCategories via WebServices API returns them out of order
I'm following the datacategory code samples in C# from the webservices API doc. When pulling them back, they don't seem to be in any sane order, as defined in the setup area. Since all that is return is a DataCategory[], and a DataCategory itself only has properties for name, label, and description, I'm a little perplexed here.
-
- paul-lmi
- January 14, 2011
- Like
- 0
- Continue reading or reply
API access to Knowledge article content inline images
When pulling Knowledge sobjects from the API, is there a way to get a "working" image URL when the article has embedded images?
Right now, when I pull an article via the API, any embedded images in that article's rich text fields are referenced with relative URL's, like /servlet/rtaImage?eid=ka130000000MFK1&feoid=00N30000004XYzF&refid=0EM30000000fDZ5 . In order to get a working URL, I need the fully qualified path to that image. I "could" run a regex against the HTML content of the rich texts fields, append a Sites hostname to the image src URL, and then it'd work, but this presents a layer of complexity to the whole thing.
Is there a way to make images in rich text fields have a fully qualified URL out of the box?
-
- paul-lmi
- January 08, 2011
- Like
- 0
- Continue reading or reply
Bug/inconsistent behavior with CaseArticle vs. CaseSolution
/** * addSolutionToCase inserts an entry to the CaseSolution table * @param solutionId string representing a valid Solution ID * @param caseId string representing a valid case ID **/ public static void addSolutionToCase(string solutionId, string caseId){ CaseSolution c = new CaseSolution(); c.SolutionId = solutionid; c.caseid = caseid; insert c; }
this works, even if a "duplicate" would be inserted. it silently catches the dupe and does nothing
/** * addArticleToCase inserts an entry to the CaseArticle table * @param knowledgearticleid string representing a valid KnowledgeArticleId * @param caseId string representing a valid CaseId **/ public static void addArticleToCase(string knowledgearticleid, string caseId){ CaseArticle a = new CaseArticle(); a.caseId = caseId; a.knowledgearticleid = knowledgearticleid; insert a; }
this fails with "Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []" if i try to insert a duplicate value.
So two issues here.
- CaseArticle insert logic is different from CaseSolution, where the functionality and use case for the two objects are identical.
- The error being thrown is useless, since it doesn't give me the value that's a dupe, and it doesn't give me the record affected, and it doesn't give me the row number of the error.
-
- paul-lmi
- January 05, 2011
- Like
- 0
- Continue reading or reply
Question on CaseArticle junction object
-
- paul-lmi
- January 05, 2011
- Like
- 0
- Continue reading or reply
Weird extra character issue with URLFOR and URL Rewriter
I'm in the process of writing and testing a Sites url rewriter class, and I ran into an issue when using the URLFOR to show a "pretty" URL on a page.
When I use
value="{!URLFOR($Page.SelfServiceKnowledgeRenderer,null,[type="FAQ",id=t.KnowledgeArticleId])}"
What I expect is
http://logmein.lmisupport.cs3.force.com/SelfService/article/urlnamefordoc
What I actually get is
http://logmein.lmisupport.cs3.force.com/SelfService/SelfServiceKnowledgeRenderer?type=+FAQ&id=kA0Q00000004EPfKAM
URLFOR is adding a urlencoded space ("+") to my hardcoded type param value of "FAQ". If I don't use a hardcoded value for the URL params being passed into URLFOR, the encoded space is not added. Bug?
-
- paul-lmi
- December 30, 2011
- Like
- 0
- Continue reading or reply
Weird issue when launching VF via onClick javascript for standard layout link
I'm running into a weird issue here. When I pop a new window using a button's onclick javascript option, like window.open("myVFpage","page"); , the page cannot reference the parent window. Is this because the parent is on a separate domain (because VF doesn't run on the same domain as the standard SF layout)? What I'm trying to do, is pop a new window which is a VF page, do some stuff, and on close of the popup, refresh the window that launched the popup.
When I try this
<apex:page standardController="Case" extensions="CaseAddContactCon" showHeader="false" sidebar="false" tabStyle="Case" id="page"> <script type="text/javascript"> function closeandreload(){ try{ if (window.opener && !window.opener.closed) { window.opener.location.reload(); } }catch(err){ } window.close(); } </script> <apex:pageBlock id="pageBlock"> <apex:form id="form"> <apex:inputField id="txtSuppliedName" value="{!case.SuppliedName}" /> <apex:inputField id="txtSuppliedEmail" value="{!case.SuppliedEmail}" /> <apex:commandButton id="btnCreate" action="{!AddContactInfo}" status="status" oncomplete="closeandreload()" value="Create Contact"/> </apex:form> </apex:pageBlock> <apex:actionstatus id="status" onstart="Working..." onstop="" /> </apex:page>
The part that is supposed to reload the window.opener window fails in every browser.
-
- paul-lmi
- December 25, 2010
- Like
- 0
- Continue reading or reply
Possible to use URL ReWriter to redirect to another page?
I wrote a URL ReWriter class, and I'm assuming it's the mapping method that is doing all the work in this scenario. My debug code shows that the proper page reference is being set up and returned by the mapper method. When I visit the site (sandbox currently), I'm taken to whatever page is configured as the 401 Unauthorized page, even though I'm not referencing any platform data whatsoever (this is pure Apex logic). I've tried allowing the URL ReWriter class in Public Access Settings. The debug log doesn't even show any messaging related to why the unauthorized page is being shown.
It looks like everything but the actual redirect/URL rewrite is happening as written, but I have nowhere to go at this point. Any insight is appreciated.
-
- paul-lmi
- December 24, 2010
- Like
- 0
- Continue reading or reply
4 bugs with Syndicated feeds
1. URL above feed preview window is broken. Missing "/" between site URL and feed name.
2. Documentation says "fid" mapping will default to the Sites URL if not supplied. It actually defaults to a login protected URL.
3. Each entry has an ID element with a bogus Salesforce URL like https://www.salesforce.com/<some record id>
4. You can't use bind variables to pass in a Data Category name. It complains about not being able to use bind vars when not using a string.
-
- paul-lmi
- December 23, 2010
- Like
- 0
- Continue reading or reply
Improving performance of Sites platform
I've been running ySlow on our Sites pages to optimize our sites config for production. In doing so, I've found a number of areas that can be improved, but are out of our control due to being handled directly by the platform.
Grade F on Add Expires headers
There are 4 static components without a far-future expiration date.
- (no expires) /static/101210/js/functions.js
- (no expires) /jslibrary/1291243772000/main.js
- (no expires) /static/101210/desktop/desktopAjax.js
- (no expires) /static/101210/js/picklist.js
Web pages are becoming increasingly complex with more scripts, style sheets, images, and Flash on them. A first-time visit to a page may require several HTTP requests to load all the components. By using Expires headers these components become cacheable, which avoids unnecessary HTTP requests on subsequent page views. Expires headers are most often associated with images, but they can and should be used on all page components including scripts, style sheets, and Flash.
Since these components are static, and clearly versioned by URL, setting a far-future expires header should definitely be done for these.
Also, these 3 files are not minified, but should be, to ensure faster download.
/static/101210/js/functions.js
/static/101210/desktop/desktopAjax.js
I'd also like to request that the CDN be used for delivering static resource content over SSL, if not done already. Since this content is static on both SSL and non-SSL browsing, using the CDN to deliver it is a better strategy for performance of the site, as well as reduced load on SF's SSL front end.
-
- paul-lmi
- December 23, 2010
- Like
- 0
- Continue reading or reply
Is there a better way to format this date in VF?
I'm grabbing a datetime from a field binding in VF and I need to format it like YYYY-DD-MM . The problem is, Salesforce will format as a single digit day and month instead of retaining the leading 0.
Is this the most efficient way to overcome that?
{!(TEXT(YEAR(d.lastpublisheddate)) & "-" & IF(LEN(TEXT(MONTH(d.lastpublisheddate)))==2,TEXT(MONTH(d.lastpublisheddate)),"0" & TEXT(MONTH(d.lastpublisheddate))) & "-" & IF(LEN(TEXT(DAY(d.lastpublisheddate)))==2,TEXT(DAY(d.lastpublisheddate)),"0" & TEXT(DAY(d.lastpublisheddate))))}
For various reasons, I don't want to do this in Apex directly, mostly due to shared code that'd get exponentially more complicated if I was to do this transformation in Apex.
-
- paul-lmi
- December 19, 2010
- Like
- 0
- Continue reading or reply
Limits for Scheduled Apex Jobs?
I could have sworn there was a max # of scheduled Apex classes of 10 per org, but I can't find it documented anywhere. Is this still true, or am I imagining it? I know the Batch Apex limit of 5 is still there, but Scheduled Apex has no mention in the "Help on this Page" reference, not the Governor Limits documentation.
-
- paul-lmi
- December 16, 2010
- Like
- 0
- Continue reading or reply
Bug when installing apps
If the target org has custom fields that are named the same as the fields included in the package, the FLS will be removed from those fields when the app is installed. I thought the whole point of namespacing fields, objects, etc, was to ensure no conflicts or issues would arise in the existing target org's configuration.
To reproduce
Create a field in both the development and subscriber orgs (managed package). Install the managed packaged in the subscriber org. The field level security configured on the subscriber's "copy" of the original, non-namespace/package field will be completely removed.
-
- paul-lmi
- December 15, 2010
- Like
- 0
- Continue reading or reply
Question on selling apps
Do we have to handle the payment/billing, or is the AppExchange handling that natively? If it doesn't handle natively, is this planned? I'm thinking of pushing a paid app on the exchange, but it's a B2C type app, and needs to be 100% ecommerce, including the purchase itself. I'd prefer to not have to custom build an ecommerce integration and licensing platform to provide a truly paid-but-no-salesperson application.
If ecomm is built in, can someone point me toward the correct documentation for it?
-
- paul-lmi
- December 15, 2010
- Like
- 0
- Continue reading or reply
Issues with Customer Portal auth in Sites
Getting the ever helpful "Authorization Required" page. Admin Preview mode is enabled, no error message. Log file is written, but no errors whatsoever. Can anyone tell me what exactly would next steps be in troubleshooting this?
19.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;VALIDATION,INFO;WORKFLOW,INFO 23:04:49.160|EXECUTION_STARTED 23:04:49.160|CODE_UNIT_STARTED|[EXTERNAL]|066300000004viE|VF: /apex/Unauthorized 23:04:49.160|CODE_UNIT_STARTED|[EXTERNAL]|01p30000000CRPs|PortalMainController <init> 23:04:49.163|METHOD_ENTRY|[62]|MAP.get(ANY) 23:04:49.163|METHOD_ENTRY|[62]|System.PageReference.getParameters() 23:04:49.163|METHOD_ENTRY|[62]|ApexPages.currentPage() 23:04:49.164|METHOD_EXIT|[62]|ApexPages.currentPage() 23:04:49.164|METHOD_EXIT|[62]|System.PageReference.getParameters() 23:04:49.164|METHOD_EXIT|[62]|MAP.get(ANY) 23:04:49.164|METHOD_ENTRY|[80]|01p30000000CRPs|PortalMainController.getUrlParam(String) 23:04:49.164|METHOD_ENTRY|[120]|MAP.get(ANY) 23:04:49.164|METHOD_ENTRY|[120]|System.PageReference.getParameters() 23:04:49.164|METHOD_ENTRY|[120]|ApexPages.currentPage() 23:04:49.164|METHOD_EXIT|[120]|ApexPages.currentPage() 23:04:49.164|METHOD_EXIT|[120]|System.PageReference.getParameters() 23:04:49.164|METHOD_EXIT|[120]|MAP.get(ANY) 23:04:49.164|METHOD_EXIT|[80]|PortalMainController.getUrlParam(String) 23:04:49.167|METHOD_ENTRY|[5]|01p30000000CRPs|PortalMainController.retrieveAlertsToShow() 23:04:49.167|METHOD_ENTRY|[20]|Database.query(String) 23:04:49.170|SOQL_EXECUTE_BEGIN|[20]|Aggregations:0|select ID, knowledgearticleid, Localized_Title__c from Alert__kav where PublishStatus = 'online' and IsVisibleInPkb = true limit 10 23:04:49.178|SOQL_EXECUTE_END|[20]|Rows:2 23:04:49.178|METHOD_EXIT|[20]|Database.query(String) 23:04:49.178|METHOD_ENTRY|[21]|LIST.size() 23:04:49.178|METHOD_EXIT|[21]|LIST.size() 23:04:49.178|METHOD_EXIT|[5]|PortalMainController.retrieveAlertsToShow() 23:04:49.178|METHOD_ENTRY|[6]|LIST.size() 23:04:49.178|METHOD_EXIT|[6]|LIST.size() 23:04:49.178|CODE_UNIT_FINISHED|PortalMainController <init> 23:04:49.179|CODE_UNIT_STARTED|[EXTERNAL]|01p30000000CRPs|PortalMainController get(SiteUrlString) 23:04:49.179|CODE_UNIT_STARTED|[EXTERNAL]|01p30000000CRPs|PortalMainController invoke(getSiteUrlString) 23:04:49.180|METHOD_ENTRY|[31]|system.Site.getCustomWebAddress() 23:04:49.180|METHOD_EXIT|[31]|system.Site.getCustomWebAddress() 23:04:49.180|METHOD_ENTRY|[33]|system.Site.getCustomWebAddress() 23:04:49.180|METHOD_EXIT|[33]|system.Site.getCustomWebAddress() 23:04:49.180|CODE_UNIT_FINISHED|PortalMainController invoke(getSiteUrlString) 23:04:49.180|CODE_UNIT_FINISHED|PortalMainController get(SiteUrlString) 23:04:49.181|CODE_UNIT_STARTED|[EXTERNAL]|01p30000000CRPs|PortalMainController get(SelfServiceHomePage) 23:04:49.181|CODE_UNIT_STARTED|[EXTERNAL]|01p30000000CRPs|PortalMainController invoke(getSelfServiceHomePage) 23:04:49.181|CODE_UNIT_FINISHED|PortalMainController invoke(getSelfServiceHomePage) 23:04:49.181|CODE_UNIT_FINISHED|PortalMainController get(SelfServiceHomePage) 23:04:49.212|CUMULATIVE_LIMIT_USAGE 23:04:49.212|LIMIT_USAGE_FOR_NS|(default)| Number of SOQL queries: 1 out of 100 Number of query rows: 2 out of 10000 Number of SOSL queries: 0 out of 20 Number of DML statements: 0 out of 100 Number of DML rows: 0 out of 10000 Number of script statements: 66 out of 200000 Maximum heap size: 0 out of 3000000 Number of callouts: 0 out of 10 Number of Email Invocations: 0 out of 10 Number of fields describes: 0 out of 100 Number of record type describes: 0 out of 100 Number of child relationships describes: 0 out of 100 Number of picklist describes: 0 out of 100 Number of future calls: 0 out of 10 Number of find similar calls: 0 out of 10 Number of System.runAs() invocations: 0 out of 20 23:04:49.212|CUMULATIVE_LIMIT_USAGE_END 23:04:49.212|CODE_UNIT_FINISHED|VF: /apex/Unauthorized 23:04:49.212|EXECUTION_FINISHED
As you can see, at the very end, it does some kind of auto-redirect to /apex/unauthorized. the URL itself will render as the portal "frontdoor" URL, like
https://logmein.lmisupport.cs3.force.com/portal/secur/frontdoor.jsp?cshc=0000000SmHV00000000elr&portalId=06030000000KLOj&refURL=https%253A%252F%252Flogmein.lmisupport.cs3.force.com%252Fportal%252Fsecur%252Ffrontdoor.jsp&retURL=%252Fportal%252Fapex%252Fportalcasedetail&sid=00DQ00000000elr%2521ARsAQPMRBgvnE_sjnWsrc8aZgq857bO3C84ObcZOp4dOrmnM2CHLBcyfp5ufh64L4XCjMfffMFKQDVo07Ua7JbtgmA1WumAlSDU&untethered=
All VF pages required are granted for Site pages, in Public Access Settings, and for the Profile of the Portal User. Same goes for all objects and fields referenced in the pages, for all 3 "layers".
Getting extremely frustrated with the lack of ability to troubleshoot issues with Sites...:(
-
- paul-lmi
- December 02, 2010
- Like
- 0
- Continue reading or reply
Changes to already public listings are not reflected in real time
In the AppExchange publishing interface, when you make changes to a Public listing, those changes are not immediately reflected in the AppExchange.
Example 1,
Upload a piece of content
Delete it
View your listing
The content is still there.
Example 2,
Change something in the Support tab, say, change the email address
Save
View listing
The content reflects the old email address
What's the deal here?
-
- paul-lmi
- December 01, 2010
- Like
- 0
- Continue reading or reply
How to (properly) write test code for Hierarchy custom settings in a managed package
Basically, writing test code for this functionality simply sucks. Because the "defaults" you set are not actually used until the setting is created for the first time, testing against them becomes an utter nightmare.
For those using protected hierarchy custom settings, what strategy are you using when pushing these in your managed appexchange packages?
-
- paul-lmi
- November 29, 2010
- Like
- 0
- Continue reading or reply
Huge discrepancy in Salesforce reported pageviews vs. reality
-
- paul-lmi
- January 29, 2011
- Like
- 1
- Continue reading or reply
Using actionpoller with a controller method that needs a parameter to be set
Is it possible to use apex:param as a child of actionpoller so that more than one action poller can be used on a single page, each calling a controller method with a specific variable value being set, eg, nest an actionpoller inside an apex:repeat, and pass the controller a variable that's different for each, and have the rerendered section (also in teh repeat) use this set variable to show a different set of items?
Practical use, populating multiple lists of items from multiple web services API calls, all on teh same page, and all via AJAX.
-
- paul-lmi
- October 13, 2010
- Like
- 1
- Continue reading or reply
Using Apex variables with LIKE in SOQL queries
I thought I'd share since figuring this out was kind of crappy. Since you can't (or I couldn't find how) concatenate a string in an SOQL query to combine wildcards like % and _ to make a query, you need to do so with the variable you want to pass in.
So if you want to do an SOQL query using LIKE, wild cards, and an Apex variable, this will work.
//create a string
String s = 'mystring';
//add wildcards around it to be more flexible in the search
s = '%' + s + '%';
//create an SOBject list with the results from our query
SObject[] obj = [select id from SObjectName where Name LIKE :s];
and this will return any row from the SObjectName where the "Name" field has "mystring" in it.
-
- paul-lmi
- May 14, 2009
- Like
- 2
- Continue reading or reply
Bug: Portal CSS is included in Sites pages if the site is login-enabled
Doing a project for a customer, and they have a login-enabled site. We're trying to use the Public Knowledge Base AppExchange package with this site, but the CSS keeps having issues. In doing some research and reviewing the generated HTML for the pages, it's apparent that the Site is including the following snippet in every page if the site is login-enabled. This is not including the fact that the user is still anonymous when browsing as well (the anonymous users are being forced to inherit this CSS as well).
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/elements.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/common.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195879000/PortalDefault/gc/dStandard.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195879000/PortalDefault/00DV00000000Uh4/00530000004j8Yx/gc/dCustom0.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/extended.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320352245000/PortalDefault/00DV00000000Uh4/060V0000000D0Ua/gc/portal.css" rel="stylesheet" type="text/css" />
<link class="user" href="/sCSS/23.0/1320195876000/PortalDefault/default/gc/setup.css" rel="stylesheet" type="text/css" />
How do I make it so that this is not happening? We include these attributes in all the VF pages and templates for the Site:
- showHeader="false"
- sidebar="false"
- standardStyleSheets="false"
But it doesn't seem to respect that if the site is login-enabled. When I disable the login functionality for the site, teh CSS fo rthe portal is not included, but other standard CSS is.
Has anyone run into this with Sites, and if so, how do you overcome it?
- paul-lmi
- November 03, 2011
- Like
- 0
- Continue reading or reply
FTP from salesforce
Hi,
We have a requirement to send attachments to a FTP server from our Prod org. I was reading about many app exchange apps like FTP attachments. As I understand, it can be used to attach files and store it on our storage server. But our requirement is send existing attachments to our FTP server. We want to have this process scheduled too like every 5 mins.
Please help me if we have any app which can do it or Can I do any customization in our org to achieve this. For example, we have HTTP commands in salesforce, on the similar lines Do we have for FTP?
thanks!
- Dcoder
- May 13, 2011
- Like
- 0
- Continue reading or reply
Non-selective query against large object type
I am facing this issue these day and I also got the idea from community to solve it, but still I am not very much clear with the solution.
My scenerio is :
List<Lead> listLead = [Select Id from lead where Name IN : setNames];
and I am getting exception :
"System.QueryException: Non-selective query against large object type".
Now the solution says :
1. it's best to try to have that field indexed by checking the "external ID" checkbox when you define that field.
Question: In my scenerio we are quering the data using the native Name field, Can this field be marked as "External Id" ?
2. filter out nulls in your Apex query.
Question: Name field can not be null for lead, then how this statement can be meaningful?
Please suggest.
Regards,
Bhawani
- Bhawani Sharma
- May 07, 2011
- Like
- 0
- Continue reading or reply
HttpRequest with https!
Hi everyone,
I'll use the HTTP Request object to POST data to an HTTPS endpoint.
Please let me know if you have some important points.
Thanks,
Seiji
- SkyBlue2007
- April 22, 2011
- Like
- 0
- Continue reading or reply
Translation for force.com sites
We have a requirement where we want to translate our VF pages into different languages depending on the locale of the browser. I have looked into custom lables but it looks like it would be too tedious to create a label for the many different languages we want to provide support for. We also want to translate picklist values. Is there a resource bundle equivalent in salesforce like we have in Java?
In addition to this we also want to have mini flag icons, clicking which would cause the pages to be rendered in the respective language represenetd by that flag when clicked.
Can someone direct me to some resources where I can learn how to implement this?
- Am123
- April 19, 2011
- Like
- 0
- Continue reading or reply
Google Analytics - _gaq.push() method
We are using Google Analytics in one of our Sties. We've added the google analytics standard component tag to the bottom of each of our VF pages:
<site:googleAnalyticsTracking />
We are trying to get a more granular level of analytics tracking for some search result links. We have a datatable that iterates over a returned list of search results. Within each result we have a couple of links we'd like to track. Is it possible to use the javascript _gaq.push() method to capture data on when these links are clicked and pass the appropriate information into Google Analytics? Can you use merge field syntax to pass the data into the method?
<apex:outputLink value="http://{!cont.Website__c}" onClick="_gaq.push(['_trackEvent', 'Category', 'Action', 'Label']);">
How would you use merge field syntax to pass in the appropriate data?
Has anyone done this? Is it possible?
Thanks for any help.
- bohemianguy100
- April 17, 2011
- Like
- 0
- Continue reading or reply
System admin cannot create/edit trigger & class today! Strange!
Our salesforce is enterprise edition and my account's profile is system admin. I go to system write trigger & class everyday.
When I login system today, I cannot find 'create' & 'edit' button in the trigger page (also class page)!
It's so strange! What can I do to solve the problem??
- kingsix
- April 16, 2011
- Like
- 0
- Continue reading or reply
Deploying a trigger/ class to Professional edition.
HI,
I have a trigger present in my developer org. The trigger is on Lead and i have a custom field which i am using in that trigger.I want to deploy this trigger to my clients org. But it happens to be Professional Edition. So when i try to deploy the trigger from eclipse it gives me an eror saying - "This Organization requires Metadata API enabled." Also when i packaged the trigger and tried to install that package, it gave me an error saying "Missing feature Apex Triggers Installing this package requires the following feature and its associated permissions: Apex Triggers" So i dont know how i shall move ahead now. What are the options by which i can achieve this?
Also let me know, what are the steps to enable the Metadata API and if i get the API enabled will i be able to deploy the trigger ? I have read that adding triggers/classes to proffessional edition requires you to create a "Managed Package" and also get it certified from salesforce. Is this the only option available? Because its quite funny that i have a trigger that was written in 2-3 hours but to add it into proffessional edition requires you to take so many steps and spend days. My client wont pay me for this delay .
Thanks
SAAS INDIA
- saas4u
- April 08, 2011
- Like
- 0
- Continue reading or reply
Rerender GoogleViz Component on Dashboard VF-Page
Hello Community!
I got a problem that I can't solve! I created a VisualForce-Page that shall be used as a Dashboard element. I integrated a selectList including a controller and a google viz piechart.
The idea was, when the user clicks an item in the list, that the piechart is being rerendere and therefore up-to-date. But it does NOT work. I don't know why, no errors, Firebug says I get a response which is actually exactly that what I wanted. ONLY the piechart doesnot rerender, at least not properly. This means after selecting an random item the outputpanel with the piechart disappears and never returns.
Anybody knows where my problem could be?
Thanks a lot, here's my code:
<apex:page controller="S2X_vfDashboard" > <apex:pageBlock id="projectprogress"> <apex:form > <apex:selectList value="{!ProjectId}" multiselect="false" size="2"> <apex:actionSupport event="onclick" action="{!getProjectProgress}" rerender="piechart" /> <apex:selectOptions value="{!ProjectOptions}" /> </apex:selectList> </apex:form> <apex:outputPanel id="piechart"> <c:PieChart jsondata="{!ProjectProgressJson}" title="Project Progress"/> </apex:outputPanel> </apex:pageBlock> </apex:page>
- NisseKnudsen
- April 08, 2011
- Like
- 0
- Continue reading or reply
Can i run my php script in force.com domain(Developer Edition).....is it possible...
1) Can i run my php script in force.com domain(Developer Edition).....is it possible...
2) If I cannot use Php in domain, Which language I can use for Scripting...........
Actually, I want to create a Field in an Object. That Field should be updated with new message ,whenever the new message updated in my Domain.(Developer Edition domain).
Also the old messages of the Filed should be stored in Force.com database.
How to do this....Please give any idea, suggestions,links......
- ram2force
- April 05, 2011
- Like
- 0
- Continue reading or reply
Can I display CRM Content work space and files on a site page ?
I would like to make content workspace files available on a force.com site page ( for un-authenticated user). Is this possible ?
If the answer is yes, then where and how do I set content workspace permission for un-authenticated user. In the workspace permission menu, I do not see an option to include unauthenticated user for view permission.
I do not want to use cutomer portal or partner portal for this purpose. Thanks !
- sf11
- April 03, 2011
- Like
- 0
- Continue reading or reply
How can I move Email attachment to a Case when Case Email has attachments?
is there cany way we can move Case Email Attachments to Case instaead of the Email via any Trigger?
I know when a Case Email is sent, it gets logged into EmailMessage, but my trigger on EmailMessage returns no Attachments, and my trigger on Attachment object does not fire at all, as if when Email attchments are inserted into Attachment it never triggers the attachment trigger.
Can anyone help me ... plz.
- GauravKumar
- April 02, 2011
- Like
- 0
- Continue reading or reply
Delete Apex class from Production
Can we delete apex class from Production environment?
i know we can disable but looking to delete them
- mavs
- March 31, 2011
- Like
- 0
- Continue reading or reply
Cookie is not getting created after Apex Callout
Hi Everyone,
I am trying to consume some apis in salesforce thier authentication approach is as follows -
When we send an HTTP login request to the given endpoint with the usename and password header following items are expected to return -
1. A session cookie, jsessionid. The client must use this cookie when submitting subsequent requests, including logoff requests.
2. A status code of 200, if the session does not encounter any errors. This indicates that the request succeeded.
The problem is that when I tried this api call using Apex callout, it returned status code of 200 but no cookie with the name 'jsessionid' is created. However i tried this API call using XMLHttpRequest object it works fine.
Please let me know if somebody knows the issue.
Thanks,
Lakhan
- Prajapati.Lakhan
- March 31, 2011
- Like
- 0
- Continue reading or reply
What is site force
What is site force.....My point of view Site force is Creating sites through Force.com Developer Edition>setup>Develop>sites>create domain name>create site....
is it correct ???
Then what is the difference between ISV force and AppExchange???
I am newbie to cloud....I have lot of confusions....If i ask in Discussion boards..here also no proper reply.....
Please reply me....
- ram2force
- March 30, 2011
- Like
- 0
- Continue reading or reply
Huge discrepancy in Salesforce reported pageviews vs. reality
- paul-lmi
- January 29, 2011
- Like
- 1
- Continue reading or reply
how do you access knowledge articles attached to cases via Apex
We're building a custom integration with SF Knowledge where we need to use some, but not all of the Case functionality. We like the Attach to Case stuff, but we don't like the Email as PDF stuff, so my plan was to upsert a solution for each Knowledge Article, and then insert an entry into the CaseSolution object for each one, so we could use the existing solutions merge field for the email templates (and also not have to update a couple dozen email templates while we're at it).
I don't see any accessible metadata in regards to querying, or even better, triggering on article attachment to Case. Is there a way to get this info as of the Summer '10 release, or are we stuck in having to essentially build out an end to end custom solution for this type of integration? I don't like going custom when it comes to page layouts, because Visualforce on a standard page layout is an ugly iframe implementation, which limits the functionality I can put in due to vertical space constraints (and my not wanting to waste vertical space).
Any insight would be appreciated.
- paul-lmi
- June 23, 2010
- Like
- 0
- Continue reading or reply
Eclipse 3.5: Flaky Syntax Highlighting
I'm noticing issues with the new plugin related to syntax highlighting when editing VisualForce .page files. It intermittently stops highlight part of the text in the document. I haven't found a pattern when it occurs.
It is also rendering squiggly yellow lines under my <apex:page> tag, and my first <script> tag. Any ideas why? These are the first 2 items in my page.
<apex:page standardController="SR__c" extensions="HSRControllerExtension" showHeader="true" sidebar="true" tabStyle="SRt__c" title="Entry Page" > <script type="text/javascript" src="{!URLFOR($Resource.jQuery142, 'js/jquery-1.4.2.min.js')}" />
Thanks,
Rich C.
- Conejo
- April 21, 2010
- Like
- 0
- Continue reading or reply