• mtbdays
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
On the Visualforce page that I have created I want to add the [Change] link next to the Record Owner name so that the record owner can be re-assigned to another user.   I know that the correct URL to change the Opportunity Owner looks something like this:

https://c.cs2.visual.force.com/006R00000032yPy/a?retURL=%2F006R00000032yPy

I am trying to go there with this Output Link tag:

Code:
<apex:outputLink value="{!$CurrentPage.parameters.id}/a?retURL=%2F{!$CurrentPage.parameters.id}">
   [Change]
</apex:outputLink>

 But it adds the "apex" part of my visualforce page's URL like so:

https://c.cs2.visual.force.com/apex/006R00000032yPy/a?retURL=%2F006R00000032yPy

How do I get the correct URL?

Thanks

Is it possible to retreive values from the referenced object of a field that is a lookup field on another object (ie. the datatype of the field is reference)?
 
My situation is:  I created a custom field on Opportunity called product__c that is a lookup field to Products.  In my Visualforce page, I can retrieve the Product name, but I want to retrieve the product ID too.  In the schema browser, I can see that in the Opportunity object, there is a custome field called product__c which has a reference to the Product2 object, and I see the Product2 fields under it, but I can not seem to retreive it in the Visualforce page.
 
I tried:  <apex:outputField value="{!Opportunity.Product__c.Product2.Id}"/>   but got an error.
 
Thanks 
On the Visualforce page that I have created I want to add the [Change] link next to the Record Owner name so that the record owner can be re-assigned to another user.   I know that the correct URL to change the Opportunity Owner looks something like this:

https://c.cs2.visual.force.com/006R00000032yPy/a?retURL=%2F006R00000032yPy

I am trying to go there with this Output Link tag:

Code:
<apex:outputLink value="{!$CurrentPage.parameters.id}/a?retURL=%2F{!$CurrentPage.parameters.id}">
   [Change]
</apex:outputLink>

 But it adds the "apex" part of my visualforce page's URL like so:

https://c.cs2.visual.force.com/apex/006R00000032yPy/a?retURL=%2F006R00000032yPy

How do I get the correct URL?

Thanks