+ Start a Discussion
Anil DuttAnil Dutt 

Apex Component in Standard SalesForce Page

Hi All,

 

can i use an apex component in opportunity standard page?

 

My problem is, I want to show an HTML Markup in readonly format in Opportunity page layout, not able to find any solution on this.

 

Please guide

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
vriavmvriavm

Yes this is called Mashup.

Create a visualforce page with standardcoltroller="Opportunity" with plain, HTML and or other data text and then go to the Opportunity pagelayout and drap drop this visualforce page where ever u want in standard pagelayout. After adding click on the properties and adjust the height and width properties to adjust size of the VF page.

All Answers

vriavmvriavm

Yes this is called Mashup.

Create a visualforce page with standardcoltroller="Opportunity" with plain, HTML and or other data text and then go to the Opportunity pagelayout and drap drop this visualforce page where ever u want in standard pagelayout. After adding click on the properties and adjust the height and width properties to adjust size of the VF page.

This was selected as the best answer
Anil DuttAnil Dutt

Can't use VF page, any other way?

Anil DuttAnil Dutt

vriavm,

 

i got your point, thanks

 

Anil DuttAnil Dutt

Hello @vriavm,

 

i have a problem , as you mentioned i added a VF page in Standar Page and its working fine but i have a situdation where i need to hide this VF page, i have a checkbox in opportunity page, if that is checked i need to hide this VF page, is it possible?

vriavmvriavm

If you want to show this VF page only in the Detail mode not in the edit mode then you can add logic to the controller supporting VF page to blank out text if the checked value on the sobject is true.

 

If you want dynamic refresh i.e. when you have it in detail mode too then you have to think about adding the check box to the VF page rather than the standard page and use AJAX with in VF page.

Anil DuttAnil Dutt

Hello @vriavm,

 

Thanks for your reply.

 

i want to hide complete VF page, VF page has property width, height and if hiding conent inside VF page only, VF page still take much empty space.

 

So need to hide VF page itself, is it possible?

vriavmvriavm

Ok then create two record types/pagelayout (assign Pagelayout 1 for Record type 1 assigned when check box is checked anf othe other one for orher scenario) and when the check box is checked and saved please flip the record type. Then because of the record type and pagelauout assigment magic everything will work fine ...

 

Anil DuttAnil Dutt

How to set Pagelayout 1 for Record type 1 ? which option is used for this?

vriavmvriavm

Create record type and go to record type under object and select pagelayout assignment....

If need hands on please reach me at vriavm@gmail.com or come for chat in skype vriavm 

Anil DuttAnil Dutt

The Opportunity page, i have, is very large , in this page as you suggested i added a VF page to show some HTML, now there is a condition where i need to show/hide this VF page on a checkbox selection. Now as you said i need to create Two Opportunity page layout where one will use VF page and another will not but as i said earlier this Opp page is very large and will be very time consuming if creating a clone of this, any other easy solution will you suggest?