+ Start a Discussion
RajiiiRajiii 

Custom component implementation

Hi all,

 

          How to create custom component with implement to standard page. That mean Now we can use custom coponent to custom visualforce page only. But i want to create custom component which is implement to standard page. when ever i install to this it will work on standard page (eg. Account standard page). If there any possible to achieve this.

 

Thanks in advance

 

 

SFDC_EvolveSFDC_Evolve

I think .. It can not be achieved.. We cant add Components to the standard Page..

 

Thanks

SFDC_Evolve

sfdcfoxsfdcfox

You still need a Visualforce page. Take the following steps:

 

1) Create a new page:

 

<apex:page standardController="TheObject">
    <c:theComponent />
</apex:page>

2) Go to TheObject's page layout, edit the layout, and move the page onto the layout as you would a field. Save your changes.

 

Now, your custom component will appear on a standard page. Please note that this doesn't work in Edit mode, only Detail mode. For that, you'd still need to write your own Visualforce page.

RajiiiRajiii

 

Hi sfdcfox,

 As you said your idea is working only in detail page. but some salesforce app achieved this. For example would you search "Provenworks" in appexchange. In this app override the scripts in standard page. Same like i want to do this. For example open below link screen of Provenworks app. Its have dropdown scripts whene we type the state name in standard page of Account object, the dropdown will automatically listout the relevent text.

 

http://www.flickr.com/photos/54414251@N02/7581680378/in/photostream/

 

Give me suggest any thing regrading this.

RajiiiRajiii

Hi sfdcfox,

 

 Could you assist me for resolve my requirement. Its a urgent need.

 

Thanks,

sfdcfoxsfdcfox

I apologize... I never got a notification about this message. If you still require assistance, I'd be glad to help you out.

RajiiiRajiii

 

Yes, I need this still, i appreciate your help.

sfdcfoxsfdcfox

You'd have to use Custom HTML injection on the page to do this. I've used it successfully before in a custom HTML component:

 

<div><img class="showListButton doNotTwist"
  onclick="imgs = window.top.document.getElementsByTagName('img'); for(var x in imgs) if(imgs[x].className=='hideListButton') twistSection(imgs[x])" src="https://na2.salesforce.com/s.gif">Collapse All</div>
<div><img class="hideListButton doNotTwist" onclick="imgs = window.top.document.getElementsByTagName('img'); for(var x in imgs) if(imgs[x].className=='showListButton') twistSection(imgs[x])" src="https://na2.salesforce.com/s.gif">Expand All</div>

You create this in Setup > Customize > Home > Home Page Components as a narrow (sidebar) HTML area. Afterwards, you add it to a page layout, and finally, you enable "Custom Sidebar components on all pages". This will give you a sidebar item that has two arrows that you can use to collapse or expand all sections on a page.

 

I'm exceptionally willing to bet that this code will not, for example, work in the report builder, since the sidebar disappears in reports. Alternatively, it is otherwise installing "helper code" that runs in the browser. It's not standard functionality, and this sort of project could break at any time. You can't use standard functionality to add arbitrary executable code to a standard page.