• BangwWthSalesforce
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I am in the process of developing a controller in which I have to use global variables. While doing so I am receiving the below error. 

 

                My code :             

 

 public class PurchasedProducts {
    List<Contact> c; 
   
      
   public List<Contact> getPurchasedProducts() {
       if(c == null) c = [select id, name from contact WHERE FirstName =:User.FirstName];
       return c;
   }
   }

 

                Error      :   Invalid bind expression type of Schema.SObjectField for column of type String

 

I am trying to get the Account details of a logged in portal user using an apex class.

 

I might be wrongly referring the global variable ..Any help on this one is highly appreciated.

 

Thank you,

Sampath

Hi all, 

 

Here is the scenario, We have a contract object to which contract line items is a child object. We want to add multiple contract line items to the contract object. Contract line items are nothing but the products with some extra fields. Like we add opp line items to the opportunities as in standard functionality. Can we do this for my scenario using apex and visualforce. Is this possible? 

 

Thanks in advance 

 

--VPrakash