• Hary464
  • NEWBIE
  • 0 Points
  • Member since 2013

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

HI friends,

 

In my application i have requirement for one visulaforce page like if supervisor logins,need to display the entire header component of the page along with the managers records and the employees under that manager.if manager logins,need to display all the employees under him and if employee logins,no need to show the header.

 

 

Please help me..i am unable to write the SOQL query to fetch id's.

Hey guys,

I already know that one can set access rights for vf pages based on user profiles. But what is the best and quickest way to set access rights based on user roles/groups?

 

Thank you

Josh

I m trying to create a picklist in my visual force page using select list component...
 
this is my apex code:
 but its give me error: "Constructor not defined: [System.SelectOption].<Constructor>(Id, Double) at line 17 column 29"
what could be the reason??
Apex Code:
public String selectedContact {get;set;}
     
    public List<SelectOption> cardList;
   
    public List<SelectOption> getGiftCard ()
    {
        POS__c posclt = [select Client__c from POS__c where id = :ApexPages.currentPage().getParameters().get('TId')];
        if (contactList == null)
        {
         GiftCertificate__c[] gcard = [select Id,Name,GiftCardNo__c,Remaining__c,ExpiresOn__c
                        from GiftCertificate__c where Purchasedfor__c =: posclt.Client__c and ExpiresOn__c >=:System.today() and Remaining__c>0];           
         cardList = new List<SelectOption>();
         for(GiftCertificate__c gc : gcard)
         {
            cardList.add(new SelectOption(gc.id, gc.GiftCardNo__c));
         }
        }
        return cardList;
    }