How do I find out where a Visualforce page is being used in my Salesforce org? - salesforce

I am fixing soql injection errors in my Salesforce org. How do I find out where that page is being called from in Salesforce? I tried looking at the 'Where is this used?" button under setup/Visualforce page/edit/ and it just shows me the test that it is being called from. I checked the show dependencies and it shows me the controller that it is associated with. I can't seem to figure how I can access the page in Salesforce so I can do a manual test on it.

Create a sandbox and try to delete it in there. If page is "properly" used - dependency should block the delete. Can be custom VF tab, button, link, embed on page layout as iframe... Can even be in community or Site as a login page for example.
If you have the project in git or sfdx you could try searching for page's API name.
But pages can be also accessed freestyle, in classic UI you used to just /apex/vfpagename in the address bar. In lightning it's bit more complex but doable for a determined user.
If you want to block access while you fix it - remove right to use the page from profiles / permission sets.
https://salesforce.stackexchange.com/a/12672/799
https://lightning-configuration.salesforce.com used to give some info about VF pages usage (count of hits I think) and there's whole Event Monitoring module paid extra (standalone or as part of Salesforce Shield) too

Related

Having issues with fields/permissions in Salesforce Sites (Accounts Related)

Hey guys I really need help with setting up sites:
I have a visualforce page that I am setting up in sites and I have gone through the profile (guest sites user) and given them all the relevant access settings for the objects, visualforce pages & the apex classes.
My page render fine when I access it internally (through SALESFORCEURL/apex/page) but when I access it through the sites URL it has an issue rendering the fields.
Basically I have an account record which I prefil using an ID in the URL Parameter (this is all working and testing via the internal visualforce page). In the internal page it appears as a prefilled editable inputText box which I can edit and submit fine. In sites the fields appear as a non-editable outputLabel that of course I can not edit, and this is the entire purpose of my visualforce page.
Does anyone have a work around for this? Or at least a solid reason as to why it works in the internal visualforce page but not from sites?
Thanks

How to include Javascript on every Salesforce Page(for tracking/analytics) Home page component vs. Custom Button vs. Controller vs

To run analytics javascript on every salesforce page I want to insert Javascript in every page.
So far I read about a couple of different methods:
home page component
a HTML Home page component (need to customize UI to show the components on every page)
limitations: does not work for Chatter, Reports and Setup
possible issue: these comments indicate problems with 'winter 13'
Custom Button with Javascript
(don't know much about this yet) sound like one has to create/assign the buttons to object-types)
Custom APEX controller?
How would this work?
Visualforce page ??
How would this work?
To my understanding it would be possible to replace everything with visualforce pages, but this is obviously not very elegant/maintainable.
I'm curious to see what other methods there are, in partciular by modifying the controller?
What other things to consider (downsides, risks) with the presented methods?
Sidebar component sounds best suited for that to be honest.
Any button/link you'll add to object detail pages will both require clicking on it(!) and won't work on "tab view", "new record" or "edit" pages. You could override most of them with VF pages but that's A LOT of work and there's no way you'll be able to customize UI of these special places: Chatter, Console tab, Reports,Dashboard.
I'm not sure what do you mean by "modifying the controller", there's no such global thing you'd have access to.
There's option of embedding a small VF page into page layout of every detail page but it's equally limited in terms of maintenance and not being present on the new/edit pages.
There are better analytics options for Force.com Sites (not the least of them being the <site:googleAnalyticsTracking/> tag). You should also receive a monthly newsletter (typically with 2-3 month's delay) summarizing usage of your Salesforce instance, user adoption, areas to explore etc. If you don't - check your User's "receive salesforce newsletter" etc settings.

add new section to lead to call api depending on the lead url

I want to add new section to the leads to call api request depending on the lead website url
It's something like creating the web-based tab, but I want to ad inside the leads to get data from a website depending on the lead website url
You can have VisualForce pages inline in a page layout, but the height is fixed and I generally don't find it to be an elegant solution, but it may work well in your case depending on what information you're bringing back and whether the length needs to be dynamic.
I'd implement this as a Visualforce page, and then use a formula field on the link to create a link to the page based on the Lead's URL. Users could then click this link to popup a new window with your page and information.

HOw To Remove facebook page in composteC1 when run the project

i want to Remove facebook page in compositeC1 cms
whenever i am run this application it comes with facebook, so i want to replace my own page at the palce of facebbok details
i want to replace some other page at facebook or eles i want to dislay
some blank empty page how
Follow this discussion - http://compositec1.codeplex.com/discussions/348539
The content is dynamically fetched from http://c1console.composite.net/C1/StartPage.aspx - the content is downloaded indirectly by the website service you the C1 Console. You can configure it - if you edit ~/Composite/web.config you will find the URL, and you can change it. Note that your custom page would need to share certain characteristics with our start screen (page title and JavaScript communicating successful load).
It has been discussed several times before on the CodePlex forum in these threads
http://compositec1.codeplex.com/discussions/272600
http://compositec1.codeplex.com/discussions/348393
http://compositec1.codeplex.com/discussions/348539

Salesforce: Adding items to 'Personal Setup' and 'Customize'

I am writing a simple salesforce app that requires app-level and user-level configuration. I have created custom objects for these settings, but cannot figure out how to add links to the Setup page (Personal Setup and Customize) so that the settings can be managed.
Quite a lot of research, and a question on a salesforce board, have left me none the wiser. I have seen a couple of scripts on the web that hack the setup sidebar with javascript (eg http://userscripts.org/scripts/show/95361) ... but this can't be the right way to do it surely?
Thanks
Jim
You are unable to do this without hacking because Salesforce want it so that you don't require over-explicit setup of any app you create - they want you to make it data-independent and in fact it may fail a security review if it is data dependent. It will also likely cause you headaches in correctly unit testing the app.
My suggestion would be to have a set of custom pages which are linked to on the home page for a user which display if they have no current values (so the first thing they see on the home page when they login for the first time is a "Hey, before you use this app you need to do some configuration through this handy wizard" and then block access to other areas of the app (i.e. display warning messages on other pages) if the app has not had this data setup.
That way you are not hacking and are providing a nice user experience around the extra setup.
Paul
DO you just want to add a new TAB on the top menu that links to the Edit page for your new sObject?
If so:
Goto setup https://cs3.salesforce.com/ui/setup/Setup
Click on 'Create' > 'Tab'
Pick the sObject you want the tab edit, the click next until you save the new tab.
There is no supported way to augment the Setup menu.
You should probably be using Custom Settings for what you are describing - they were designed for app-level and user-level configuration, and are available from Setup.
Otherwise, if it really is custom setup that requires fancier logic / UI / etc, you may want to do what many SFDC ISV's do and ship your app with its own configuration tab that's hidden, and/or custom VF page that manages app settings.

Resources