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
Brian Chipman 4Brian Chipman 4 

Override the standard detail page with a VF page using a custom controller

We have a Visualforce page created for us a while ago which we would like to use to override the standard Account Detail page.  However, it uses a custom controller, like this:

<apex:page controller="My_CustomController">

When I go to Buttons, Links, and Actions for this object to the View action, the page does not appear in the drop down list of pages available for override use.  My understanding is because this page does not use the stand controller. Any way to get around this and use this page for override?

Ultimately, I would like to conditionally oveerride based on Profile and I think I can do that, but it seems like I need to override for everyone first as per the above but I can't seem to do that with this page.
 
Best Answer chosen by Brian Chipman 4
Steven NsubugaSteven Nsubuga
My first stab at it is to include a constructor, in the same format as ealier shared. See updated class below:
public class EB_AccountUiUtility {

    // This is to get the Account Id from the URL

    public String accId {get {return ApexPages.currentPage().getParameters().get('id');} set;}
    public String pNumber {get {return ApexPages.currentPage().getParameters().get('phone');} set;}

    public EB_AccountUiUtility(ApexPages.StandardController controller){
        
    }

    public class accountWrapper{
      @AuraEnabled
      public Account acctObj{get;set;}
      @AuraEnabled
      public String recordType{get;Set;}

    }

    @AuraEnabled
    public static Account getAccountApxc(String accId) {
         return  [SELECT Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c
                FROM Account
                WHERE Id = :accId
                OR Phone LIKE :accId Limit 1];
    }

    @AuraEnabled
    public static List<Asset> getAssetsApxc(String accId) {
        System.debug('DES - GetAssetsAPXC - Account ID :: ' +  accId);
        return [SELECT Id, Name, Company_Number__c, Product2.Name, Where_Purchased__c, Total_Cost_of_Orders_Under_Mnfg_Warranty__c,
                       Description, Product_Version_Serial__c, PurchaseDate, Order_Eligibility_Ext_Warranty_Orders__c,
                       Order_Eligibility_Mfg_Warranty_Orders__c, Price, AccountId , Version__c
                FROM Asset
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Entitlement> getEntitlementsApxc(String accId) {
        return [SELECT Id, Name, AssetId, Asset_Name_Serial_Number__c, Type,
                       Status, EndDate, Manufacturer_Warranty__c, Compare_Contracts__c,
                       Extended_Warranty__c, Parts_Under__c, Labor_Under__c,
                       Warranty_Price_Standard__c, Warranty_Best_Or_Premier__c
                FROM Entitlement
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Case> getCasesApxc(String accId) {
        return [SELECT Id, Created_Date__c,Subject, AssetId, Description, Priority, Reason_Code__c,
                       Reason_Sub_Code__c, What_diagnostics_did_you_do_del__c, Internal_Notes__c, EntitlementId,
                       What_was_the_resolution_of_the_call__c, CaseNumber,
                       CreatedDate, Solution_Bucket__c, Owner.Name, LastModifiedBy.Name, LastModifiedDate,
                       (SELECT Id, CommentBody, CreatedBy.Name, CreatedDate FROM CaseComments WHERE IsDeleted = false),
                       (SELECT Id, Name FROM Service_Estimates__r),
                       (SELECT Id, Name FROM Work_Orders__r)
                FROM Case
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Part_Order__c> getPartOrdersApxc(String accId) {
        return [SELECT Id, Created_Date__c,Name, Asset__c, Number_of_Tangibles__c, Grand_Total__c,
                       ICON_Customer_Number__c,Case__c, Order_Number__c, PRMS_OrderNumber__c,
                       Status__c, Warranty_Order__c, Shipping_Method__c, Shipping_Address_Description_Attn__c, PRMS_PO_Number__c,
                       Tracking_Link__c, Case__r.CaseNumber, CreatedDate, Reason_Code__c, Entitlement__c, Track_Order__c, Main_Part_Description__c,
                       (SELECT Id, Name, Part_Link__c, Description__c, Case__c,
                               Quantity__c, Sale_Price__c, Standard_Cost__c,
                               Under_Extended_Warranty__c, Under_Mnfg_Warranty__c
                        FROM Service_Estimate_Detail__r),
                       (SELECT Id, Name, PRMS_Line_Number__c, Product_Number__c,
                               PRMS_Status__c, Quantity_Ordered__c, Quantity_Shipped__c,
                               PRMS_Order_Detail_Status_External_ID__c, Order_Number__c,
                               LastModifiedDate
                        FROM PRMS_Part_Order_Statuses__r),
                       (SELECT Id, Name, PRMS_Order_Number__c, Tracking_Number__c,
                               Ship_Company__c, Ship_Method__c, Ship_Date__c
                        FROM Part_Order_Ship_Details__r),
                       (SELECT Id, Name, Line_Number__c, Part_Number__c, Product_Description__c,
                               Sum_Shipped__c, Ship_Date__c
                        FROM Part_Order_Ship_Details1__r)
                FROM Part_Order__c
                WHERE Account__c = :accId];
    }

    @AuraEnabled
    public static List<Service_Order__c> getServiceOrdersApxc(String accId) {
        return [SELECT Id, Created_Date__c,Name, Asset__c, Days_Open__c, Case__c, PRMS_SO_Number__c,
                       SO_Technician__c, Parent_Service_Order__c, PRMS_Service_Order_Number__c,
                       Status__c, Charge_To__c, CreatedDate, Service_Coordinator_Name__c,  Part_Order_Under_Warranty__c,
                       Account__r.Name, Case__r.CaseNumber, Owner.Name, Owner.Phone, Entitlement__c,
                       (SELECT Id, Name, Part__c, Part_Description__c, Status__c,
                               Quantity__c, In_Stock__c, Part_received_broken__c,
                               Trunk_Stock__c
                        FROM Service_Order_Details__r)
                FROM Service_Order__c
                WHERE Account__c = :accId];
    }

    @AuraEnabled
    public static List<Account> getSearchAccountResult(String accName) {

        List<Account> searchAccList = new List<Account>();
        List<List<sObject>> searchAccountList = [FIND :accName
                                                 IN Name Fields
                                                 RETURNING Account(Name, Company__c)
                                                ];
        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = searchAccountList[0];
        }
        System.debug('searchAccList ---'+searchAccList);
        return searchAccList;
    }

    @AuraEnabled
    public static List<accountWrapper> getAllSearchAccountResult(String accName) {
        accName = '%' + accName + '%';

        List<Account> searchAccList = new List<Account>();
        List<Account> searchAccountList = [SELECT Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c, RecordTypeId
                FROM Account
                WHERE Name LIKE :accName
                OR Phone LIKE :accName];

        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = searchAccountList;
        }
        System.debug('searchAccList ---'+searchAccList);
        return wrapAccounts(searchAccList);
    }

    @AuraEnabled
    public static List<accountWrapper> getSOSLSearchAccountResult(String accName) {
        accName = '%' + accName + '%';
        List<Account> searchAccList = new List<Account>();
        List<List<SObject>> searchAccountList = [FIND :accName IN ALL FIELDS
        RETURNING Account (Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c, RecordTypeId)];

        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = (list<Account>)searchAccountList[0];
        }
        System.debug('searchAccList ---'+searchAccList);

        return wrapAccounts(searchAccList);
    }    

    private static List<accountWrapper> wrapAccounts(list<Account> lstAccts){
      Map<ID,Schema.RecordTypeInfo> rt_Map = Account.sObjectType.getDescribe().getRecordTypeInfosById();
      list<accountWrapper> rcList = new list<accountWrapper>();

      for(Account a : lstAccts){
        accountWrapper aw = new accountWrapper();
        aw.acctObj = a;
        aw.recordType = rt_Map.get(a.recordTypeId).getName();
        rcList.add(aw);
      }

      return rcList;
    }

    @AuraEnabled
    public static Map<String, Id> GetAllRecordTypesforObj(String objAPIName)
    {
        Map<ID,Schema.RecordTypeInfo> tempMap = Schema.getGlobalDescribe().get(objAPIName).getDescribe().getRecordTypeInfosByID();
        System.Debug('DES Record Type Results :: ' + tempMap);
        Map<String, Id> rtMap = new Map<String, Id>();
        for (String key : tempMap.KeySet()) {
            rtMap.put( tempMap.Get(key).getName(), key);
        }
        return rtMap;
    }

    //Seems that the callout won't query arrays, commenting out for now
    //@AuraEnabled
    //public static Map<Id, List<AssetLinkCtrl.displayWrapper>> getAssetLinks_apxc(List<Asset> assetList){
        
    //  Map<Id, List<AssetLinkCtrl.displayWrapper>> rcMap = new Map<Id, List<AssetLinkCtrl.displayWrapper>>();
      



    //  return rcMap;

    //}

    @AuraEnabled
    public static map<Id, String> getAssetLinks_apxc(Asset assetObj){
      System.debug('Asset Object :: ' + assetObj);
      Asset emptyObj=new Asset();
      if(assetObj == emptyObj)return null;
      map<Id, String> rcMap = new map<Id, String>();
      EB_AssetLinkCalloutHandler alc = new EB_AssetLinkCalloutHandler(assetObj);  
      System.debug('Asset Link Control Final Display :: ' + alc.returnData);
      String jString = JSON.serialize(alc.returnData);
      rcMap.put(assetObj.Id, jString);
      return rcMap;

    }
}

 

All Answers

Steven NsubugaSteven Nsubuga
You definitely cannot use this page to override the Standard Detail page. What you can do is to hide the standard Account tab, and only show a visualforce page, and within that visualforce page, you can select individual accounts opening them with this page.
Brian Chipman 4Brian Chipman 4
Appreciate the response Steven.  Pretty much what I expected but not knowing everything, thought I'd put it out there to see if I was missing anything.  Unfortunately, the override is needed in the console.  Will continue to look at the options.
Steven NsubugaSteven Nsubuga
Noted Brian. Did you try to use My_CustomController as a controller extension? That would still allow you to use the standard controller as well as this class for the Apex logic you need.
<apex:page standardController="Account" extensions="My_CustomController">

 
Brian Chipman 4Brian Chipman 4
I didn't but it wouldn't hurt to try. My thinking was there is a bit of a difference between a controller and a controller extension so it probably wouldn't work.  I'll do it and let you know.  This is a pretty complex page that embeds Lightning components into a VF page created by an outside developer and is somewhat beyond my understanding a the moment.
Brian Chipman 4Brian Chipman 4
Tried it and I get this error on saving the page:

Unknown constructor 'My_CustomController.My_CustomController(ApexPages.StandardController controller)'
Steven NsubugaSteven Nsubuga

You need to modify the Apex class as well, and change its constructor to look like this:
public My_CustomController(ApexPages.StandardController controller) {
	//controller logic
}
Any chance you could share the code for both the visualforce page and the controller class? It will be easier for me to debug.

 
Brian Chipman 4Brian Chipman 4
Orignally (working before adding the standardController to VF page) it was:
public class My_CustomController {
  //controller logic
}
Now is:
public My_CustomController(ApexPages.StandardController controller) {
    //controller logic
}
Get:  'Unexpected token 'My_CustomController'.
Added 'class' back in:
public class My_CustomController(ApexPages.StandardController controller) {
     //controller logic
}
Get: Expecting '{' but was: '('


 
Steven NsubugaSteven Nsubuga
I shared merely a snippet. The general structure would be more along the lines of ...
public class My_CustomController {

   public My_CustomController(ApexPages.StandardController controller) {
    //controller logic
   }
}

It would greatly help if I saw the original  My_CustomController class in its entirety.
Brian Chipman 4Brian Chipman 4
Much appreciate your time thus far. Still getting an error with your latest. Here is the complete original controller with it's real name:
 
public class EB_AccountUiUtility {

    // This is to get the Account Id from the URL

    public String accId {get {return ApexPages.currentPage().getParameters().get('id');} set;}
    public String pNumber {get {return ApexPages.currentPage().getParameters().get('phone');} set;}

    public class accountWrapper{
      @AuraEnabled
      public Account acctObj{get;set;}
      @AuraEnabled
      public String recordType{get;Set;}

    }

    @AuraEnabled
    public static Account getAccountApxc(String accId) {
         return  [SELECT Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c
                FROM Account
                WHERE Id = :accId
                OR Phone LIKE :accId Limit 1];
    }

    @AuraEnabled
    public static List<Asset> getAssetsApxc(String accId) {
        System.debug('DES - GetAssetsAPXC - Account ID :: ' +  accId);
        return [SELECT Id, Name, Company_Number__c, Product2.Name, Where_Purchased__c, Total_Cost_of_Orders_Under_Mnfg_Warranty__c,
                       Description, Product_Version_Serial__c, PurchaseDate, Order_Eligibility_Ext_Warranty_Orders__c,
                       Order_Eligibility_Mfg_Warranty_Orders__c, Price, AccountId , Version__c
                FROM Asset
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Entitlement> getEntitlementsApxc(String accId) {
        return [SELECT Id, Name, AssetId, Asset_Name_Serial_Number__c, Type,
                       Status, EndDate, Manufacturer_Warranty__c, Compare_Contracts__c,
                       Extended_Warranty__c, Parts_Under__c, Labor_Under__c,
                       Warranty_Price_Standard__c, Warranty_Best_Or_Premier__c
                FROM Entitlement
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Case> getCasesApxc(String accId) {
        return [SELECT Id, Created_Date__c,Subject, AssetId, Description, Priority, Reason_Code__c,
                       Reason_Sub_Code__c, What_diagnostics_did_you_do_del__c, Internal_Notes__c, EntitlementId,
                       What_was_the_resolution_of_the_call__c, CaseNumber,
                       CreatedDate, Solution_Bucket__c, Owner.Name, LastModifiedBy.Name, LastModifiedDate,
                       (SELECT Id, CommentBody, CreatedBy.Name, CreatedDate FROM CaseComments WHERE IsDeleted = false),
                       (SELECT Id, Name FROM Service_Estimates__r),
                       (SELECT Id, Name FROM Work_Orders__r)
                FROM Case
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Part_Order__c> getPartOrdersApxc(String accId) {
        return [SELECT Id, Created_Date__c,Name, Asset__c, Number_of_Tangibles__c, Grand_Total__c,
                       ICON_Customer_Number__c,Case__c, Order_Number__c, PRMS_OrderNumber__c,
                       Status__c, Warranty_Order__c, Shipping_Method__c, Shipping_Address_Description_Attn__c, PRMS_PO_Number__c,
                       Tracking_Link__c, Case__r.CaseNumber, CreatedDate, Reason_Code__c, Entitlement__c, Track_Order__c, Main_Part_Description__c,
                       (SELECT Id, Name, Part_Link__c, Description__c, Case__c,
                               Quantity__c, Sale_Price__c, Standard_Cost__c,
                               Under_Extended_Warranty__c, Under_Mnfg_Warranty__c
                        FROM Service_Estimate_Detail__r),
                       (SELECT Id, Name, PRMS_Line_Number__c, Product_Number__c,
                               PRMS_Status__c, Quantity_Ordered__c, Quantity_Shipped__c,
                               PRMS_Order_Detail_Status_External_ID__c, Order_Number__c,
                               LastModifiedDate
                        FROM PRMS_Part_Order_Statuses__r),
                       (SELECT Id, Name, PRMS_Order_Number__c, Tracking_Number__c,
                               Ship_Company__c, Ship_Method__c, Ship_Date__c
                        FROM Part_Order_Ship_Details__r),
                       (SELECT Id, Name, Line_Number__c, Part_Number__c, Product_Description__c,
                               Sum_Shipped__c, Ship_Date__c
                        FROM Part_Order_Ship_Details1__r)
                FROM Part_Order__c
                WHERE Account__c = :accId];
    }

    @AuraEnabled
    public static List<Service_Order__c> getServiceOrdersApxc(String accId) {
        return [SELECT Id, Created_Date__c,Name, Asset__c, Days_Open__c, Case__c, PRMS_SO_Number__c,
                       SO_Technician__c, Parent_Service_Order__c, PRMS_Service_Order_Number__c,
                       Status__c, Charge_To__c, CreatedDate, Service_Coordinator_Name__c,  Part_Order_Under_Warranty__c,
                       Account__r.Name, Case__r.CaseNumber, Owner.Name, Owner.Phone, Entitlement__c,
                       (SELECT Id, Name, Part__c, Part_Description__c, Status__c,
                               Quantity__c, In_Stock__c, Part_received_broken__c,
                               Trunk_Stock__c
                        FROM Service_Order_Details__r)
                FROM Service_Order__c
                WHERE Account__c = :accId];
    }

    @AuraEnabled
    public static List<Account> getSearchAccountResult(String accName) {

        List<Account> searchAccList = new List<Account>();
        List<List<sObject>> searchAccountList = [FIND :accName
                                                 IN Name Fields
                                                 RETURNING Account(Name, Company__c)
                                                ];
        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = searchAccountList[0];
        }
        System.debug('searchAccList ---'+searchAccList);
        return searchAccList;
    }

    @AuraEnabled
    public static List<accountWrapper> getAllSearchAccountResult(String accName) {
        accName = '%' + accName + '%';

        List<Account> searchAccList = new List<Account>();
        List<Account> searchAccountList = [SELECT Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c, RecordTypeId
                FROM Account
                WHERE Name LIKE :accName
                OR Phone LIKE :accName];

        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = searchAccountList;
        }
        System.debug('searchAccList ---'+searchAccList);
        return wrapAccounts(searchAccList);
    }

    @AuraEnabled
    public static List<accountWrapper> getSOSLSearchAccountResult(String accName) {
        accName = '%' + accName + '%';
        List<Account> searchAccList = new List<Account>();
        List<List<SObject>> searchAccountList = [FIND :accName IN ALL FIELDS
        RETURNING Account (Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c, RecordTypeId)];

        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = (list<Account>)searchAccountList[0];
        }
        System.debug('searchAccList ---'+searchAccList);

        return wrapAccounts(searchAccList);
    }    

    private static List<accountWrapper> wrapAccounts(list<Account> lstAccts){
      Map<ID,Schema.RecordTypeInfo> rt_Map = Account.sObjectType.getDescribe().getRecordTypeInfosById();
      list<accountWrapper> rcList = new list<accountWrapper>();

      for(Account a : lstAccts){
        accountWrapper aw = new accountWrapper();
        aw.acctObj = a;
        aw.recordType = rt_Map.get(a.recordTypeId).getName();
        rcList.add(aw);
      }

      return rcList;
    }

    @AuraEnabled
    public static Map<String, Id> GetAllRecordTypesforObj(String objAPIName)
    {
        Map<ID,Schema.RecordTypeInfo> tempMap = Schema.getGlobalDescribe().get(objAPIName).getDescribe().getRecordTypeInfosByID();
        System.Debug('DES Record Type Results :: ' + tempMap);
        Map<String, Id> rtMap = new Map<String, Id>();
        for (String key : tempMap.KeySet()) {
            rtMap.put( tempMap.Get(key).getName(), key);
        }
        return rtMap;
    }

    //Seems that the callout won't query arrays, commenting out for now
    //@AuraEnabled
    //public static Map<Id, List<AssetLinkCtrl.displayWrapper>> getAssetLinks_apxc(List<Asset> assetList){
        
    //  Map<Id, List<AssetLinkCtrl.displayWrapper>> rcMap = new Map<Id, List<AssetLinkCtrl.displayWrapper>>();
      



    //  return rcMap;

    //}

    @AuraEnabled
    public static map<Id, String> getAssetLinks_apxc(Asset assetObj){
      System.debug('Asset Object :: ' + assetObj);
      Asset emptyObj=new Asset();
      if(assetObj == emptyObj)return null;
      map<Id, String> rcMap = new map<Id, String>();
      EB_AssetLinkCalloutHandler alc = new EB_AssetLinkCalloutHandler(assetObj);  
      System.debug('Asset Link Control Final Display :: ' + alc.returnData);
      String jString = JSON.serialize(alc.returnData);
      rcMap.put(assetObj.Id, jString);
      return rcMap;

    }
}




 
Steven NsubugaSteven Nsubuga
My first stab at it is to include a constructor, in the same format as ealier shared. See updated class below:
public class EB_AccountUiUtility {

    // This is to get the Account Id from the URL

    public String accId {get {return ApexPages.currentPage().getParameters().get('id');} set;}
    public String pNumber {get {return ApexPages.currentPage().getParameters().get('phone');} set;}

    public EB_AccountUiUtility(ApexPages.StandardController controller){
        
    }

    public class accountWrapper{
      @AuraEnabled
      public Account acctObj{get;set;}
      @AuraEnabled
      public String recordType{get;Set;}

    }

    @AuraEnabled
    public static Account getAccountApxc(String accId) {
         return  [SELECT Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c
                FROM Account
                WHERE Id = :accId
                OR Phone LIKE :accId Limit 1];
    }

    @AuraEnabled
    public static List<Asset> getAssetsApxc(String accId) {
        System.debug('DES - GetAssetsAPXC - Account ID :: ' +  accId);
        return [SELECT Id, Name, Company_Number__c, Product2.Name, Where_Purchased__c, Total_Cost_of_Orders_Under_Mnfg_Warranty__c,
                       Description, Product_Version_Serial__c, PurchaseDate, Order_Eligibility_Ext_Warranty_Orders__c,
                       Order_Eligibility_Mfg_Warranty_Orders__c, Price, AccountId , Version__c
                FROM Asset
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Entitlement> getEntitlementsApxc(String accId) {
        return [SELECT Id, Name, AssetId, Asset_Name_Serial_Number__c, Type,
                       Status, EndDate, Manufacturer_Warranty__c, Compare_Contracts__c,
                       Extended_Warranty__c, Parts_Under__c, Labor_Under__c,
                       Warranty_Price_Standard__c, Warranty_Best_Or_Premier__c
                FROM Entitlement
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Case> getCasesApxc(String accId) {
        return [SELECT Id, Created_Date__c,Subject, AssetId, Description, Priority, Reason_Code__c,
                       Reason_Sub_Code__c, What_diagnostics_did_you_do_del__c, Internal_Notes__c, EntitlementId,
                       What_was_the_resolution_of_the_call__c, CaseNumber,
                       CreatedDate, Solution_Bucket__c, Owner.Name, LastModifiedBy.Name, LastModifiedDate,
                       (SELECT Id, CommentBody, CreatedBy.Name, CreatedDate FROM CaseComments WHERE IsDeleted = false),
                       (SELECT Id, Name FROM Service_Estimates__r),
                       (SELECT Id, Name FROM Work_Orders__r)
                FROM Case
                WHERE AccountId = :accId];
    }

    @AuraEnabled
    public static List<Part_Order__c> getPartOrdersApxc(String accId) {
        return [SELECT Id, Created_Date__c,Name, Asset__c, Number_of_Tangibles__c, Grand_Total__c,
                       ICON_Customer_Number__c,Case__c, Order_Number__c, PRMS_OrderNumber__c,
                       Status__c, Warranty_Order__c, Shipping_Method__c, Shipping_Address_Description_Attn__c, PRMS_PO_Number__c,
                       Tracking_Link__c, Case__r.CaseNumber, CreatedDate, Reason_Code__c, Entitlement__c, Track_Order__c, Main_Part_Description__c,
                       (SELECT Id, Name, Part_Link__c, Description__c, Case__c,
                               Quantity__c, Sale_Price__c, Standard_Cost__c,
                               Under_Extended_Warranty__c, Under_Mnfg_Warranty__c
                        FROM Service_Estimate_Detail__r),
                       (SELECT Id, Name, PRMS_Line_Number__c, Product_Number__c,
                               PRMS_Status__c, Quantity_Ordered__c, Quantity_Shipped__c,
                               PRMS_Order_Detail_Status_External_ID__c, Order_Number__c,
                               LastModifiedDate
                        FROM PRMS_Part_Order_Statuses__r),
                       (SELECT Id, Name, PRMS_Order_Number__c, Tracking_Number__c,
                               Ship_Company__c, Ship_Method__c, Ship_Date__c
                        FROM Part_Order_Ship_Details__r),
                       (SELECT Id, Name, Line_Number__c, Part_Number__c, Product_Description__c,
                               Sum_Shipped__c, Ship_Date__c
                        FROM Part_Order_Ship_Details1__r)
                FROM Part_Order__c
                WHERE Account__c = :accId];
    }

    @AuraEnabled
    public static List<Service_Order__c> getServiceOrdersApxc(String accId) {
        return [SELECT Id, Created_Date__c,Name, Asset__c, Days_Open__c, Case__c, PRMS_SO_Number__c,
                       SO_Technician__c, Parent_Service_Order__c, PRMS_Service_Order_Number__c,
                       Status__c, Charge_To__c, CreatedDate, Service_Coordinator_Name__c,  Part_Order_Under_Warranty__c,
                       Account__r.Name, Case__r.CaseNumber, Owner.Name, Owner.Phone, Entitlement__c,
                       (SELECT Id, Name, Part__c, Part_Description__c, Status__c,
                               Quantity__c, In_Stock__c, Part_received_broken__c,
                               Trunk_Stock__c
                        FROM Service_Order_Details__r)
                FROM Service_Order__c
                WHERE Account__c = :accId];
    }

    @AuraEnabled
    public static List<Account> getSearchAccountResult(String accName) {

        List<Account> searchAccList = new List<Account>();
        List<List<sObject>> searchAccountList = [FIND :accName
                                                 IN Name Fields
                                                 RETURNING Account(Name, Company__c)
                                                ];
        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = searchAccountList[0];
        }
        System.debug('searchAccList ---'+searchAccList);
        return searchAccList;
    }

    @AuraEnabled
    public static List<accountWrapper> getAllSearchAccountResult(String accName) {
        accName = '%' + accName + '%';

        List<Account> searchAccList = new List<Account>();
        List<Account> searchAccountList = [SELECT Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c, RecordTypeId
                FROM Account
                WHERE Name LIKE :accName
                OR Phone LIKE :accName];

        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = searchAccountList;
        }
        System.debug('searchAccList ---'+searchAccList);
        return wrapAccounts(searchAccList);
    }

    @AuraEnabled
    public static List<accountWrapper> getSOSLSearchAccountResult(String accName) {
        accName = '%' + accName + '%';
        List<Account> searchAccList = new List<Account>();
        List<List<SObject>> searchAccountList = [FIND :accName IN ALL FIELDS
        RETURNING Account (Id, Name, AccountNumber, Type, BillingStreet, BillingCity,
                       BillingState, BillingPostalCode, BillingCountry, ShippingStreet,
                       ShippingCity, ShippingState, ShippingPostalCode, ShippingCountry,
                       Account_Email__c, Phone, Company__c, Data_Cleanliness_Status__c,
                       Data_Cleanliness_Reason__c, Phone1__c, Phone2__c, Billing_Address_Description_Attn__c, RecordTypeId)];

        if(searchAccountList != null  && !searchAccountList.isEmpty()) {
            searchAccList = (list<Account>)searchAccountList[0];
        }
        System.debug('searchAccList ---'+searchAccList);

        return wrapAccounts(searchAccList);
    }    

    private static List<accountWrapper> wrapAccounts(list<Account> lstAccts){
      Map<ID,Schema.RecordTypeInfo> rt_Map = Account.sObjectType.getDescribe().getRecordTypeInfosById();
      list<accountWrapper> rcList = new list<accountWrapper>();

      for(Account a : lstAccts){
        accountWrapper aw = new accountWrapper();
        aw.acctObj = a;
        aw.recordType = rt_Map.get(a.recordTypeId).getName();
        rcList.add(aw);
      }

      return rcList;
    }

    @AuraEnabled
    public static Map<String, Id> GetAllRecordTypesforObj(String objAPIName)
    {
        Map<ID,Schema.RecordTypeInfo> tempMap = Schema.getGlobalDescribe().get(objAPIName).getDescribe().getRecordTypeInfosByID();
        System.Debug('DES Record Type Results :: ' + tempMap);
        Map<String, Id> rtMap = new Map<String, Id>();
        for (String key : tempMap.KeySet()) {
            rtMap.put( tempMap.Get(key).getName(), key);
        }
        return rtMap;
    }

    //Seems that the callout won't query arrays, commenting out for now
    //@AuraEnabled
    //public static Map<Id, List<AssetLinkCtrl.displayWrapper>> getAssetLinks_apxc(List<Asset> assetList){
        
    //  Map<Id, List<AssetLinkCtrl.displayWrapper>> rcMap = new Map<Id, List<AssetLinkCtrl.displayWrapper>>();
      



    //  return rcMap;

    //}

    @AuraEnabled
    public static map<Id, String> getAssetLinks_apxc(Asset assetObj){
      System.debug('Asset Object :: ' + assetObj);
      Asset emptyObj=new Asset();
      if(assetObj == emptyObj)return null;
      map<Id, String> rcMap = new map<Id, String>();
      EB_AssetLinkCalloutHandler alc = new EB_AssetLinkCalloutHandler(assetObj);  
      System.debug('Asset Link Control Final Display :: ' + alc.returnData);
      String jString = JSON.serialize(alc.returnData);
      rcMap.put(assetObj.Id, jString);
      return rcMap;

    }
}

 
This was selected as the best answer
Brian Chipman 4Brian Chipman 4
That seems to resolve the errors in modifying the controller and extension of the VF page. I can also now use it to override the View functionality in Buttons, Links, and Actions  I will proceed with testing functionality and attempting to conditionally override it. Thank you so much for your assistance.