• Liana
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies

Hi all,

 

 

Is it possible to create a link in Visualforce that when's clicked, export data into excel from Salesforce, not from <apex:pageblockTable>?

 

Thanks in advance..

 

Regards,
Liana

  • August 09, 2013
  • Like
  • 0

Hi all, I'm  newbie in apex and visulaforce development, I have the following apex class:

public with sharing class UserAccountCtrl {
    
    public Id UserAccountId{get;set;}
    public String ErrorMessage{get;set;}
    
    public UserAccountCtrl(){  
        
        try
        {
            Id userId = UserInfo.getUserId();
            User us = [select Id, ContactId from User where Id =: userId];
            
            if(us.ContactId == null)
                ErrorMessage = 'The user logged is not related to any contact';
            
            Contact cont = [select Id, AccountId from Contact where Id =: us.ContactId];
            
            UserAccountId = cont.AccountId; 
        }
        catch(Exception ex)
        {
            ErrorMessage = ex.getMessage();
        }
    }
}

 

and visualforce code:

<apex:page controller="UserAccountCtrl" 
sidebar="false" 
           showHeader="false" 
           standardStylesheets="false">
 
<a href="/{!UserAccountId}" target="_parent">Account</a>
 
</apex:page> 
 
How to write a test class for this?? Thanks in advance..

 

  • May 21, 2013
  • Like
  • 0

Hi all..

 

I want to display fields dynamically based on the chosen value in other field of picklist. I'm trying out one of the example here: http://www.salesforce.com/docs/developer/cookbook/Content/vf_dynamic_page_update.htm.

 

It works fine is you access the visualforce through URL https:salesforce-instance/apex/visualforcepage?id=....

 

But I just wanna incorporate the dynamic fields to the existing object and its layout so I just dragged the visualforce page. Result: Visualforce section works in the View, but outside that section the fields that should be hidden statically appear. When I click Edit, visualforce section not there, the dynamic fields still appear.

 

Does this mean that when we want to have partial dynamic fields, we have to re-create and copy EVERYTHING from the object to the Visualforce page??

 

THanks guys in advance

  • May 15, 2013
  • Like
  • 0

Hi..

Does anyone know how to direct a Partner home WIde component to Account detail page(omitting the Account page sidebar)?

  • May 07, 2013
  • Like
  • 0

Hi, I'm trying to make the Home page Wide component of Partner Portal to their Account detail page. Does anyone know how?

  • May 07, 2013
  • Like
  • 0

Hi, I'm trying to make the Home page Wide component of Partner Portal to their Account detail page. Does anyone know how?

  • May 07, 2013
  • Like
  • 0

New to VF development, so pardon the newbie question

 

I have a custom object called Projects and would like to embedded a VF page of related cases on the page layout.  I have the VF page working as I like, but do not know how to.

 

1.  Embed the page into the Projects layout

2.  Once embedded, limit the VF page to only return cases related to the project.

 

This needs to be on both the view and edit pages of the project layout.

 

Any assistance is greatly appreciated