Print this page

URLFOR Change Owner takes user to login screen

Knowledge Article Number 000181759
Description Customer had added a link for the user to change the owner on a custom object in a visualforce page using this syntax: Change Owner But when the user selects this link they are taking to the standard login screen. 

The code sample

 
<apex:page standardController="Action__c">
    
    <apex:outputField value="{!Action__c.OwnerId}"/><br/>
    <apex:outputLink value="{!URLFOR($Action.Action__c.ChangeOwner,Action__c.Id)}">Change Owner</apex:outputLink>
</apex:page>
 
Resolution As per the document, ChangeOwner was supported to only objects below:
 
Account
Ad group
Campaign
Case
Contact
Contract
Google campaign
Keyword
Leads
Opportunities
Search phrase
SFGA version
Text ad
 
So it's clear that it's not supported to Custom objects.

That is the reason why it's redirecting to login page. However,this behavior is expected as per the documentation. 


 




promote demote