• Ranjith Punneli
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 8
    Replies

Hi All,

 

I have a requirement to rerender a portion in a page which is under tabpanel.

 

I have a tabpanel and one of the tabs is pointing to a different page (profile page). Profile page contains two selectllist attributes in which one select list rerender based on selected value of first select list. However, this rerender is not working in actual page that contains tabpanel while it works when accessed separately.

 

<apex:tabPanel switchType="client" selectedTab="{!selectedTab}" headerClass="mainHeader" id="theTabPanel">
<apex:tab label="My Profile" name="Profile" id="tabProfile"> <apex:include pageName="ProfilePage" /> </apex:tab> </apex:tabPanel>

Hi All,

 

I have a requirement to send username and password to customer portal users. The current structure has an encrypted field in contact object to store password. 

 

As vf email template cannot use encrypted  fields in email, I have added a text variable in login controller to store this password.

Now I need to pass this text variable from controller to vf email template. How can I do this? 

 

Thanks,

R

When I run below soql query in urlrewriter class, I am getting an error.

 

--KnowledgeArticleVersion[] knowledgeArticle = [SELECT Id, KnowledgeArticleId, Language, Title, Urlname FROM KnowledgeArticleVersion where publishstatus='Online'and Urlname =:articleUrlName and (Language = 'en_US' or Language = 'de') ];

 

--KnowledgeArticleVersion[] knowledgeArticle = [SELECT Id, KnowledgeArticleId, Language, Title, Urlname FROM KnowledgeArticleVersion where publishstatus='Online'and Urlname =:articleUrlName and Language = :userLanguageCode];

 

Error: Compile Error: Implementation restriction: When querying the KnowledgeArticleVersion object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or Language = [language ISO code]. In addition Language is only permitted in a top-level AND condition.

 

How can I get rid of language from where condition or how can I dynamically assign a variable to it?

 

Thanks,

R

Hi All,

 

Can anyone please help me to rewrite url for those links which are not in <apex:outputlink> ?

 

Also, is there any way to perform this for knowledge articles?

 

Regards,

Ranjith

Hi All,

 

Is there any way to make webtocase in a pop up window and on submit it should display a confirmation page? Also I need to keep a cancel button in case page and close button in confirmation that takes us to actual page.

 

Thanks,

R

Hi All,

 

Anyone please help me to access child categories of a category group. Code below

 

List <DataCategoryGroupSobjectTypePair> pairs = new List<DataCategoryGroupSobjectTypePair>();
DataCategoryGroupSobjectTypePair pair = new DataCategoryGroupSobjectTypePair();
pair.setSobject('KnowledgeArticleVersion');
pair.setDataCategoryGroupName('CustomerType');
pairs.add(pair);
List<Schema.DescribeDataCategoryGroupStructureResult>results = Schema.describeDataCategoryGroupStructures(pairs, true);
System.debug('*****'+results);
DataCategory [] toplevelCategories = results[0].getTopCategories();
DataCategory toplevelCategoryAll = toplevelCategories[0];
System.debug('*****'+toplevelCategoryAll );
List<Schema.DataCategory> childCategories = toplevelCategoryAll.getChildCategories();
System.debug('*****'+childCategories[0] );

 

I have 5 child category in category group "All". However, getChildCategories() is returning null. My profile has permission to view all child category. Please help me out.

 

Hello,

 

I have a vsualforce page that displays a button based on user language. This is associated to home page custom component with type as Links in customer portal home page. However, this button is always displayed regardless of language. It is working finw when I execute as apex/vfpage.

 

<apex:page controller="controller" sidebar="false" showHeader="false" cache="false" standardStylesheets="false">
<apex:form>
<apex:pageBlock>
<apex:outputPanel rendered="{!showButton}">
<apex:commandButton action="{!action}" value="Button" />
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>

 

public class controller{

public String userLanguage;
public Boolean showButton{get;set;}
public controller() {
currentUser = [SELECT id, languagelocalekey, contactId FROM User WHERE id = :UserInfo.getUserId()];
userLanguage = currentUser.languagelocalekey;
if(userLanguage == 'en_US'){
showButton = True;
}
else {
showButton = False;
}
}
public pageReference action(){
return null;
}
}

 

Thanks,

R

Hi All,

 

How can I use rendered statement based on rich text field null or not?

 

<apex:outputField value="{!w.Event_Image__c}" rendered="{(w.Event_Image__c <> Null)}" /> <br/>

 

Event_Image__c is a rict text field.

 

Thanks,

R

Hi,

 

I need to display various kinds of below data in a vf page.

 

<link to articles><User friendly name><some texts> 

<some texts><link to articles><User friendly name><some texts>

<some texts><link to articles><User friendly name>

 

I created a text area field and updated data as 

<a href="<link>" target="_parent">Learn more</a> and get excited to enhance your skills!

However, when I try to display this in vf, it is exactly coming as what i have given, not as a url link. 

 

any suggestions?

Hi All,

 

Even though I have assigned  a new Change Password page into Login Settings of Force.com site, I am still forwarded to salesforce standard change password page when a user logs in for th first time.

 

Any suggestions?

 

Regards,

R

Hi All,

 

I need to add vf components in Customer Portal Home Page layout. Please see below my code

 

HTML Link:

<iframe src="/apex/Custom_Home" frameborder="0" width="100%"></iframe>&nbsp;

 

Vf page: 

<apex:page ">
<c:newsTopics />

</apex:page>

 

Vf component: 

<apex:component controller="CustomerPortalStartPageController">
<apex:pageBlock title="Top 5 Topics" >
<apex:pageBlockTable value="{!newsTopics}" var="top5">
<apex:column>
<apex:outputLink value="{!news.Article_URL__c}">{!news.Title__c}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:component>

 

However, when i see home page, its just showing the iframe code..not actual vf page.

 

Any suggestions?

 

Regards,

R

Hi All,

 

I need to add vf components in Customer Portal Home Page layout. Please see below my code

 

HTML Link:

<iframe src="/apex/Custom_Home" frameborder="0" width="100%"></iframe>&nbsp;

 

Vf page: 

<apex:page ">
<c:newsTopics />

</apex:page>

 

Vf component: 

<apex:component controller="CustomerPortalStartPageController">
<apex:pageBlock title="Top 5 Topics" >
<apex:pageBlockTable value="{!newsTopics}" var="top5">
<apex:column>
<apex:outputLink value="{!news.Article_URL__c}">{!news.Title__c}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:component>

 

However, when i see home page, its just showing the iframe code..not actual vf page.

 

Any suggestions?

 

Regards,

R

 

Hi All,

 

I have added a new data category to my sfdc knowledge. Now I need to update all exisitng artcles with new data category variables. 

 

It's not possible to go to each article and update its data category. How can I do a bulk update?

 

Regards,

R

Hi All,

 

Is there any way that we can create a visualforce page which helps customer portal users to download latest updates or any file that they are looking for.?

 

Thank You,

Ranjith

Hi all,

 

Is there any way to create just one web-to-case form that can support multiple languages?

 

Thanks,

R

Hi All,

 

I have enabled customer portal sign in link which takes to custom built sign in page. When you enter username and password and click on Log in, it will check and pass details to another page by calling Site.Login(un, pswd, startURL) where startURL or second page controller has https://cs9.salesforce.com/secur/login_portal.jsp?orgId=&portalId= link to login to appropriate page. 

However, I am only getting  this error 'Your login attempt has failed. Make sure the username and password are correct. '

 

Site Page which has Sign In link

<div id="signin_link"><a href="https://<companyname>.secure.force.com/success/SiteLogin?language=en_US">Sign In</a></div>

 

SiteLoginController

global String username {get; set;}
global String password {get; set;}

startURL = '/CommunityLogin?email='+username+'&language='+userLanguage;
return Site.login(username, password, startURL);

 

CommunityLogin

Check whether contact exists

Check whether user exists

if both exists pass values:

'https://cs9.salesforce.com/secur/login_portal.jsp?orgId=&portalId=&un=&pw=';

 

However, I am only getting above error and I am not able to check that in developer sandbox.

 

Need info:

How to identify developer and production customer portal?

Difference between Site.login() and calling pagereference 'https://cs9.salesforce.com/secur/login_portal.jsp?orgId=&portalId='

 

Thanks,

Ranjith

 

Hi all,

 

I have a requirement to create more than one record of same object from different visualforce pages.

 

I have a tab which list all records of an object and also a button to create a new record. When I click on 'New Record', it should open up another tab next to first tab to create a new record. There are few other tabs and buttons inside this visualforce page. When I click on Next button in this new vf page, it should navigate to next tab inside New Record. This is working fine.

 

My next requirement is even when the new record tab (second tab) is not yet saved and if user clicks on 'New Record' again from first tab, then I have to open a third tab to create second record which is completely independent of first record. But I am facing problem when I click on Next button. It is checking all other mandatory fields irrespective of same tab.

 

How can I acheive this?

 

Thank you so much for everyone's help & time!!

 

Regards,

Ranjith

 

 

Hi All,

 

Anyone please help me to access child categories of a category group. Code below

 

List <DataCategoryGroupSobjectTypePair> pairs = new List<DataCategoryGroupSobjectTypePair>();
DataCategoryGroupSobjectTypePair pair = new DataCategoryGroupSobjectTypePair();
pair.setSobject('KnowledgeArticleVersion');
pair.setDataCategoryGroupName('CustomerType');
pairs.add(pair);
List<Schema.DescribeDataCategoryGroupStructureResult>results = Schema.describeDataCategoryGroupStructures(pairs, true);
System.debug('*****'+results);
DataCategory [] toplevelCategories = results[0].getTopCategories();
DataCategory toplevelCategoryAll = toplevelCategories[0];
System.debug('*****'+toplevelCategoryAll );
List<Schema.DataCategory> childCategories = toplevelCategoryAll.getChildCategories();
System.debug('*****'+childCategories[0] );

 

I have 5 child category in category group "All". However, getChildCategories() is returning null. My profile has permission to view all child category. Please help me out.

 

Hi All,

 

How can I use rendered statement based on rich text field null or not?

 

<apex:outputField value="{!w.Event_Image__c}" rendered="{(w.Event_Image__c <> Null)}" /> <br/>

 

Event_Image__c is a rict text field.

 

Thanks,

R

Hi All,

 

Is there any way that we can create a visualforce page which helps customer portal users to download latest updates or any file that they are looking for.?

 

Thank You,

Ranjith

Hi all,

 

I have a requirement to create more than one record of same object from different visualforce pages.

 

I have a tab which list all records of an object and also a button to create a new record. When I click on 'New Record', it should open up another tab next to first tab to create a new record. There are few other tabs and buttons inside this visualforce page. When I click on Next button in this new vf page, it should navigate to next tab inside New Record. This is working fine.

 

My next requirement is even when the new record tab (second tab) is not yet saved and if user clicks on 'New Record' again from first tab, then I have to open a third tab to create second record which is completely independent of first record. But I am facing problem when I click on Next button. It is checking all other mandatory fields irrespective of same tab.

 

How can I acheive this?

 

Thank you so much for everyone's help & time!!

 

Regards,

Ranjith

 

 

Hello,

Can anyone tell me :

Am I missing something or it's not possible to create a lookup relationship to Articles ?

Thats something i definitely need.

So, at this point, should I create something like a String field on my Custom Object that will store the article id and make another SOQL query to fetch it every time additionally ?

 

Kind regards

  • September 20, 2011
  • Like
  • 1

We ran into this issue in our very large production environment.  We created a VF web-to-case form, which supports 10+ languages via custom labels and the translation workbench.

 

The form inserts a case, and that insert triggers a Case AfterInsert trigger that takes the SuppliedEmail and SuppliedName fields to create or associate a proper Contact to the Case.

 

When submitting this form in any language BUT English, the follow exception is thrown:

 

System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
Even if a field is indexed a filter might still not be selective when:


1. The filter value includes null (for instance binding with a list that contains null)

2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times) 

 

None of the fields involved in this form or trigger are causing this, as I'm entering the same exact data in the English form as I am the Japanese form.

 

I logged a Case with support for this, but we're in a time crunch and I'd rather not have to settle with wrapping a trigger in a useless try...catch block to bypass this issue, and subsequently defeat the purpose of the trigger in this use case.

 

Again, this is only when the VF page language attribute is not English, and all SOQL queries use a "limit 1" statement, on top of ruling out nulls.

Through trial and error I discovered that placing a graphic on the Customer Portal via Setup>Customize>Customer Portal>Settings [Your Portal] Edit>Look and Feel(section)>Lookup for a HTML Document to include in your Header or Footer you have to do some trickery to display it properly.

 

The major issue is that a graphic will not dynamically resize to the end users screen resolution settings. So, as in my case, I wanted to display a graphic to fill the entire Header section of the Customer Portal.

 

I created my graphic, which happened to be 1440px in width and 100px in height, and uploaded it to SF Documents as a .jpg image. I then created my HTML doc with a simple < img src > tag referencing the unique path of the image with will be something like, https://na6.salesforce.com/servlet/servlet.ImageServer?id=[an id]&oid=[another id]&lastMod=1247154430000.

(In order to get the image path you have to go to Documents and locate the image you want, click on the file to see its details, and then right click over the image and do a "Copy Image Location."

I then uploaded that to SF Documents. I then referenced that HTML document in the Customer Portal Setup as my Header.

 

All looked great, until I changed my browser to display on a screen with a 1024x768 resolution. The graphic displayed so long here that I had to scroll horizontally to see the entire graphic. I tested this with other resolutions and well much dismay.

 

So the Solution: Your either have to use JavaScript in your HTML document to handle the image resizing based on the end users screen resolution or you can use a < div > tag. I chose the latter. Here is the code:

 

<div style="position:relative; width:100%; height:100%; margin:0px; padding:0px; left:0px; right:0px;z-index:1">
<img src="https://na6.salesforce.com/servlet/servlet.ImageServer?id=01580000000rnGN&oid=00D3000000000yM&lastMod=1247154430000" width="100%">
</div>
<div style="z-index:2; position:relative; margin:0px; padding:0px;">
</div>

A caveat on this though. You must create your image to be the width of the largest screen resolution you may encounter. That maybe 1280 or 1440 or even bigger. The above code will allow that image to display correctly on all resolutions settings, dynamically.

 

I have since discovered that the resizing to display on the appropriate end users sreen res settings for even HTML components used on the Customer Portal Homepage layout you will have to use the above code somewhere as well. If you do not your may see your square HTML component change size.

 

 

 

 This is a full screen shot using 1024x768 screen res and notice how the middle section (HTML Homepage Component) gets cut off.

 

Hopefully this above tip will mitigate any pain you have using HTML on your Customer Portal.