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
gvgv 

What is the best way to do this?

 

Not sure what would be the best way to achieve this.

 

There is a custom button in account object. When clicked on that fields of a new custom object is displayed.

The page layout should match standard saleforce layout.

 

One of the field displayed on the new page is dependant on few fields on the account object.

 

How do I do this. I was thinking I would call a Visual force page from the custom button. Is that a good idea?

 

 

max_overloadmax_overload

Visualforce page to maintain SFDC look and feel, it also auto generates the appropriate classes when using their native <apex:> tags so you don't have to have working knowledge of their CSS...

 

You will probably need a custom controller to evaluate the currentPage() and then pass parameters to your visualforce layout which will determine how the custom object is displayed.

 

Those are my thoughts, there are probably other ways to do it though.

gvgv

Thanks Max_overload for replying. I tried to implement the visual force page  and I run into the following issue.(even though the page has nothing , I just started writing )

 

the following is my visual force page. Here  I am trying to create an input field for Approval submitted field. 

 

 

<apex:page Controller="ControllerRelatedAccounts" showheader="true"   >
 
<apex:form id="frm">
    <apex:pageBlock title="Edit" mode="Edit" id="pb">
  
 <apex:inputField  value="{!Related_Accounts__c.Approval_Submitted__c}"/>
       
    </apex:pageBlockSection>
	
	
      <apex:pageBlockButtons >
         
      </apex:pageBlockButtons>

</apex:pageBlock>
</apex:form>



 

</apex:page>

 

 

the following is my controller

 

 

 
public with sharing class ControllerRelatedAccounts {

object CurrentRecordId;	
	
public ControllerRelatedAccounts(){}


public ControllerRelatedAccounts(Apexpages.Standardcontroller controller){
	CurrentRecordId = controller.GetRecord();
	
}
}

 

 

When I compile this, I get this error 'Unknown property 'ControllerRelatedAccounts.Approval_Submitted__c

 

I think I have to create a property for the above field in my controller but not sure if that has to be the same as my field name i.e. Approval_Submitted__c.

 

Or is it a different errror?

 

Thanks