• Srinath Teram
  • NEWBIE
  • 49 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 13
    Replies

Hello,

I want to open another visualforce page ("test") with the following tag.

How can I call that?

 

<li><a href="test"style="font-size: 18px;">Text</a></li>

I have requirement which intends to add <html lang="en"> to a visualforce page. When I add this particular line to my VF page, it renders out in browser ("view page source") as expexcted. However, an additional <html> also appears in the browser as default.:

<html>

<html lang = "en">

......

......

</html>

</html>

 

Could anyone please guide me on how to remove the default <html> tag?

 

-Srinath

Hi All,

 

I have a scenario in which I have an custom article type named "Rich Text" and has a custom Rich Text Area field named "Content".  I need to enter text and embed video into this field. I have embedded video using iframe by clicking embed video icon available. The video gets embeded and displays the text and video in Internal App. However, while exposing it to Public website, only the text portion of "Content" filed appears; the iframe section seems to be stripped. 

 

Can anyone help me out with this?

 

Thanks

Srinath T

Hi,

 

I have a business requirement where the Customer Portal should have a customized look and feel. For achieving that, I am using an HTML file with css uploaded in Documents tab and refering it in Header field of Customer Portal.

Now the requirement is to switch the css based on current users' language. I can switch the css using javascript inside the HTML file if I can get users language to that HTML file when page loads. Is there a way to get the current users' language in that HTML file when the page loads? I tried {!$User.Language}, but was not helpful. Could anyone advice please.

 

Thanks in Advance,

Srinath Teram

 

Hi,

 

I have a visualforce page where I displays some records inside<apex:commandLink> within <apex:repeat> iterating over a list in the controller. When I click on any of the records listed out it should display a pop up with details of the selected record. Anyone please suggest me how to acieve this?

 

VF Page:

<apex:outputPanel id="feedbackResponse">
    <apex:outputPanel styleClass="customPopup" layout="block" rendered="{!seeAllWebinarsFlag}">
                      <apex:repeat value="{!webinars}" var="w">
                            <apex:commandLink onclick="seewebinardetails();return false;">{!w.Title__c}      </apex:commandLink> <br/>
                     </apex:repeat><br/>
          </apex:outputPanel></apex:outputPanel>

Controller:

onlineSocials = [Select Id, Title__c from Online_Social__c];
for(Online_Social__c os: onlineSocials) {
webinars.add(os);
}

Popup section:

 

<apex:repeat value="{!webinars}" var="w">
                 <apex:outputField value="{!w.Title__c}"/> <br/>
</apex:repeat><br/>

 

seewebinardetails function:

function seewebinardetails() {
    webinar();
    }
<apex:actionFunction name="webinar" action="{!seeWebinarDetails}" reRender="feedbackResponse, WebinarDetails"/>

I have requirement which intends to add <html lang="en"> to a visualforce page. When I add this particular line to my VF page, it renders out in browser ("view page source") as expexcted. However, an additional <html> also appears in the browser as default.:

<html>

<html lang = "en">

......

......

</html>

</html>

 

Could anyone please guide me on how to remove the default <html> tag?

 

-Srinath

Hi, I have an outputlink, and I would like to implement the function that everytime when the link is clicked, then it always opens the redirect visualforce page in the same window or tab. The problem is that the redirect link is not static one like google.dk, it should has paramete cus which defines a specific customer.

 

I have tried to use window.open(url, target) like the following, but it doesn't work.

<apex:outputLink onlick="window.open('/apex/XX?

&cus={!account.Customer_No__c}', 'sametab')" target="sametab" styleClass="viewLink">click me< /apex:outputLink>

 

I hope you can help me. Thanks in advance.

How do we know what type of sandbox i am logged in.

I understand we can see that by logging into production.but incases where you dont have production access,

is there a way to see what type of sandbox i am in from sandbox logged in.?

I have a VisualForce page and controller that works great when I test it using preview from within the developer console, but when I try to access it from my VisualForce public access site, the record does not get inserted.  I have been checking all of the permissions, but have not been able to find anywhere that has allowed the records to be created.  Let me know if I need to add code, etc.  But I know the code works, it just seems like a permissions issue somewhere that I am missing...

 

Thanks for the help.

Hi,

 

in our organization we have some guest users.Please advise me how to create guest user to access to sites

 

cheers..!

Mahendra

  • April 12, 2013
  • Like
  • 0

Hi All, I am trying to create VF page which has two button "search" and "upload". when i click the "search" button i want it to search the data file stored in mt system. Then i click "upload" which is to upload a data file stored in our system . It is same as the upload files option in gmail. kindly help me to resolve this issue. Thanks , Regards, lavanya.

Hi,

 

 

I have a WSDL which was developed in Java, it has many packages and nested classes. 

How can i generate classes from that WSDL in salesforce platform.

 

Thanks.

 

 

Hello

How can I change a profile license from salesforce platform to salesforce.

Thanks for your help

Hi,

This has become a real pain point for me, but how can I turn off the maintenance page and get the actual error message.


When I try to view my site, it says "Down for Maintenance".  I understand this is to supress the error message, but I really need to see what's going on behind the scenes so I can fix the problem.


Does anyone know how to do this? Or is there some other way which I can see the true error message?

 

Thanks.

Hello,

I want to open another visualforce page ("test") with the following tag.

How can I call that?

 

<li><a href="test"style="font-size: 18px;">Text</a></li>

Hello All,

Just want to share my experience in creating Visualforce Email template where you want to display date and time in User timezone

 

***Overview
You are in MST time zone.
Let's say we have Date/Time field TaskDateTime__c and use it in Visualforce email template to show recipient the time in email.

<apex:outputText value="{0,date,EEEE, MMMM d, yyyy, HH:mm:ss}"><apex:param value="{!RelatedTo.TaskDateTime__c}" /></apex:outputText>

 

In email time will be converted and showed to GMT instead of EST.

 

The outputField (which convert time to user locale automatically) does not
work in Visualforce Email templates (not supported).

 

So how do I tell to display in Visualforce Email template time in User
timezone? For example MST?

 

***Implementation Details (worarounds)***

 

I found two workarounds:

 

Workaround 1: Use Controller class for the Component to use in template

In order to format the date in various TimeZone in Email Template, we can follow the steps:

1. First create a Controller class for the Component

Setup|App Setup|Develop|Apex Classes|New

Formatted_DateTime_Controller Class Code
----------------------------------------------------------

public class controller_formatted_datetime
{
public DateTime date_time { get; set; } //property that reads the datetime value from component attribute tag
public String defined_format { get; set;} //property that reads the string value from component attribute tag
public String getFormattedDatetime()
{
if (date_time == null) {return ''; }
else { if (defined_format == null) {
return date_time.format(); //return the full date/time in user's locale and time zone
}
else { return date_time.format(defined_format,'MST'); //Specify Time zone like IST,CST
}}}}

 

2. Create a Component

Setup|App Setup|Develop|Components

VF Component Code (Name: VFEmailTempComp)

<apex:component access="global" controller="controller_formatted_datetime">{!FormattedDatetime}
<apex:attribute assignTo="{!date_time}" description="The DateTime value to be rendered" name="date_time_value" type="DateTime"></apex:attribute>
<apex:attribute assignTo="{!defined_format}" description="The optional format to use for the DateTime value to be rendered" name="date_time_format" type="String"></apex:attribute>
</apex:component>

 

 

3. Create an Email Template and embed the component.

Setup|Administration Setup|Communication Templates|Email Templates

Email Template Code
---------------------------------

<messaging:emailTemplate subject="Testing DateTime Format" recipientType="Contact" >
<messaging:plainTextEmailBody >
Formatted: <c:VFEmailTempComp date_time_value="{!NOW()}" date_time_format="EEE MMM d kk:mm:ss z yyyy" />
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

 

It will display current time in MST timezone.


Workaround 2: Calculate difference in the apex:param value (for MST (-7) it will be 7/24=0.291666666

Date: <apex:outputText value="{0,date,EEEE, MMMM d, yyyy}"><apex:param value="{!RelatedTo.Scheduled_Clock_In__c - 0.291666666}" /></apex:outputText>
Time: <apex:outputText value="{0,date,h:ma}"><apex:param value="{!RelatedTo.Scheduled_Clock_In__c - 0.291666666}" /></apex:outputText> MST

  

  • August 28, 2012
  • Like
  • 4
 
<knowledge:articleList articleVar="article"  	        				  
hasMoreVar="hasMore" pageSize="10" articleTypes="Samples_and_Demos__kav, How_To__kav" categories="Topic:Applications,Topic:Desktop">

 I'm trying to specify more then one articleType and category as filters for the VF tag "articleList".

 

The documentation doesn't specify how to do this.

 

For ArticleType, seperating by a comma works fine as listed. If I do the same thing for "categories", I only get results from the 2nd category specified, instead of from both. In this example, I only get results from Topic:Desktop and not Topic:Applications

 

Is there a different syntax for specifying multiple categories or is this a bug?

 

thanks!

Hi,

 I am new in Salesforce...I want to design a pop up window. The window will appear after save button is hit which will show the values those an user has entered as input. After the pop up comes out then the user will click the ok in pop up and the page will be redirected to the object view page.

 

Now how can I implement it throgh java script or any other possible way.

Can u pls provide some sample coding for it.

 

Thanks in advance,

  • September 28, 2011
  • Like
  • 0

Hello All,

Just want to share my experience in creating Visualforce Email template where you want to display date and time in User timezone

 

***Overview
You are in MST time zone.
Let's say we have Date/Time field TaskDateTime__c and use it in Visualforce email template to show recipient the time in email.

<apex:outputText value="{0,date,EEEE, MMMM d, yyyy, HH:mm:ss}"><apex:param value="{!RelatedTo.TaskDateTime__c}" /></apex:outputText>

 

In email time will be converted and showed to GMT instead of EST.

 

The outputField (which convert time to user locale automatically) does not
work in Visualforce Email templates (not supported).

 

So how do I tell to display in Visualforce Email template time in User
timezone? For example MST?

 

***Implementation Details (worarounds)***

 

I found two workarounds:

 

Workaround 1: Use Controller class for the Component to use in template

In order to format the date in various TimeZone in Email Template, we can follow the steps:

1. First create a Controller class for the Component

Setup|App Setup|Develop|Apex Classes|New

Formatted_DateTime_Controller Class Code
----------------------------------------------------------

public class controller_formatted_datetime
{
public DateTime date_time { get; set; } //property that reads the datetime value from component attribute tag
public String defined_format { get; set;} //property that reads the string value from component attribute tag
public String getFormattedDatetime()
{
if (date_time == null) {return ''; }
else { if (defined_format == null) {
return date_time.format(); //return the full date/time in user's locale and time zone
}
else { return date_time.format(defined_format,'MST'); //Specify Time zone like IST,CST
}}}}

 

2. Create a Component

Setup|App Setup|Develop|Components

VF Component Code (Name: VFEmailTempComp)

<apex:component access="global" controller="controller_formatted_datetime">{!FormattedDatetime}
<apex:attribute assignTo="{!date_time}" description="The DateTime value to be rendered" name="date_time_value" type="DateTime"></apex:attribute>
<apex:attribute assignTo="{!defined_format}" description="The optional format to use for the DateTime value to be rendered" name="date_time_format" type="String"></apex:attribute>
</apex:component>

 

 

3. Create an Email Template and embed the component.

Setup|Administration Setup|Communication Templates|Email Templates

Email Template Code
---------------------------------

<messaging:emailTemplate subject="Testing DateTime Format" recipientType="Contact" >
<messaging:plainTextEmailBody >
Formatted: <c:VFEmailTempComp date_time_value="{!NOW()}" date_time_format="EEE MMM d kk:mm:ss z yyyy" />
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

 

It will display current time in MST timezone.


Workaround 2: Calculate difference in the apex:param value (for MST (-7) it will be 7/24=0.291666666

Date: <apex:outputText value="{0,date,EEEE, MMMM d, yyyy}"><apex:param value="{!RelatedTo.Scheduled_Clock_In__c - 0.291666666}" /></apex:outputText>
Time: <apex:outputText value="{0,date,h:ma}"><apex:param value="{!RelatedTo.Scheduled_Clock_In__c - 0.291666666}" /></apex:outputText> MST

  

  • August 28, 2012
  • Like
  • 4