function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dn6184dn6184 

Account Ownership Question

Hi,

 

Re: Account Detail

 

I am trying to restrict the user from access to the list of activities shown below when the Account Ownership [change] link is clicked.

 

Transfer open opportunities not owned by the existing account owner
Transfer closed opportunities
Transfer open tickets owned by the existing account owner
Transfer closed tickets
Keep Account Team
Send Notification Email

 

I would like to know how to override this button to provide an alternate destination or alter what the use sees on this screen. 

 

Our Account Page is provided below:

 

<apex:page id="page1" standardController="Account" extensions="IntegratedObjectController" >
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" />
<script>
var $j = jQuery.noConflict();
$j(function() {
    var saved = InlineEditData.prototype.handleResponse;
    InlineEditData.prototype.handleResponse = function(responseText) {
        saved.apply(this, arguments);
        actionSave();
    };
});

function saved() {
    var errorMessage = $j("#page1\\:form1\\:dynamicOutput").html();
    if (errorMessage.length > 0) {
        alert(errorMessage);
    }
}
</script>
<apex:form id="form1">
    <apex:actionFunction name="actionSave" action="{!actionSave}" oncomplete="saved();"
        rerender="dynamicOutput " />
    <apex:outputPanel id="dynamicOutput" layout="block" style="display:none">
    {!ErrorMessage}
    </apex:outputPanel>
    <apex:detail subject="{!account.Id}" relatedList="true" inlineEdit="true" relatedListHover="true"
        showChatter="true" title="true" />
</apex:form>
</apex:page>

 

I would like to know to modify / override the content in the detail section of this form.

 

Thanks in advance, Dave

 

Best Answer chosen by Admin (Salesforce Developers) 
mtbclimbermtbclimber

There is currently no supported way to modify the destination of the "change" link next to the account owner in the standard detail page or the product of the apex:detail component. 

 

You could build your own apex:detail component implementation that includes your own link to whatever page you want. 

 

A standard override for the "Change Owner" function is probably the right ultimate solution for you, if you agree I encourage you to vote on this idea.