• Jens Peter Kristensen
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Developer
  • Danfoss A/S

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

I have a visualforce page with a apex controller connected. There is no connection / lookup to the user object.

On that page I need a <apex:inputField that has a standard lookup to the user object.

Right now my include field is not shown because I don't have it connected to a user object. 

Can someone tell me how to do this ?

Maybe it needs to be solved by creating a dummy field that has that lookup but I fail it getting it to work.

If somebody could help what is needed in the vfp and in the apex controller that would be great.

I tried to create a brand new vfp and apex controller to get a better understanding of the problem :

Vfp :

<apex:page controller="JpkTestController">
    <apex:form id="form">
    <apex:pageBlock title="View as" id="viewAs">
        <apex:pageBlockSection >    
               <apex:inputField id="TestUser" value="{!user1.Id}" required="false"/>       
         </apex:pageBlockSection>
    </apex:pageBlock>   
    </apex:form>
</apex:page>

Apx controller :

public class JpkTestController {

  public User user1 {get;set;}  

  public JpkTestController() {
        user1= new User(); 
  }
}
 
Hi

I have a problem with showing the opportunityLineItem total value correctly according to the user.locale.
I have tried to out the field TotalPrice from opportunityLineItem with <apex:outputField but that is not possible since we run multicurrency on the org and therefor i get this error "Currency fields on entities with effective dated currency are not supported.".
I have the correct value in opportunityLineItem.TotalPrice

I have then found out that I need to create a wrapperclass in my apex extension controller so that I can add a currencyfield to opportunityLineItem. The only thing I need to achieve with this field is to be able to output it with <apex:outputField  so that it is correct formatted.
But I can't really get it to run - can someone help me to create that wrapper class ?
and how when do i trigger that wrapperclass ?

Thanks a lot.

Br

jpk

 
Hi

I have a visualforce page with a apex controller connected. There is no connection / lookup to the user object.

On that page I need a <apex:inputField that has a standard lookup to the user object.

Right now my include field is not shown because I don't have it connected to a user object. 

Can someone tell me how to do this ?

Maybe it needs to be solved by creating a dummy field that has that lookup but I fail it getting it to work.

If somebody could help what is needed in the vfp and in the apex controller that would be great.

I tried to create a brand new vfp and apex controller to get a better understanding of the problem :

Vfp :

<apex:page controller="JpkTestController">
    <apex:form id="form">
    <apex:pageBlock title="View as" id="viewAs">
        <apex:pageBlockSection >    
               <apex:inputField id="TestUser" value="{!user1.Id}" required="false"/>       
         </apex:pageBlockSection>
    </apex:pageBlock>   
    </apex:form>
</apex:page>

Apx controller :

public class JpkTestController {

  public User user1 {get;set;}  

  public JpkTestController() {
        user1= new User(); 
  }
}