To show different list page for different profile - salesforce

I have two vf pages, say vf1 and vf2, which have standard controller for same object say Leads. Now i want to show vf1 page for edit button for any profile1 and and vf2 page for profile2 on edit button.
Tried to see any option in Profile menu, but not able to find anything for page assignment for list/edit/create/...etc. for an object.

There is no such feature in Salesforce to allow visualforce page assignment per profile.
I would recommend below
1.Create a hirerachy custom setting to store the mapping between the vf page and the profile .
2.Write a vf that will be assigned for all profiles but on action (called upon where page loads) it will look into the hirerachy custom settings map and takes the user to right visualforce page .You can pass along page parameters as query parameters .

Related

Redirect to an external page from a specific article - Drupal 7

I'm very new with drupal.
I have a blog, List of posts.
I need redirect a specific post to a specific external webpage, Is this possible ?
By example: I need to redirect the post (with the arrow red) to www.facebook.com/somePage. (if it's possible in other tab)
But the other posts should be redirect normally to its internal pages.
In this moment I have this configuration:
Any suggestions?
Method 1
Add a URL Redirect pointing from the 'node/#' URL to your external URL.
Render View as you have it now, and when you click the article Title it'll send you to the external page.
Method 2
Install the 'Link' module.
Add a 'Link' field to your Content Type. Configure the link field to open links in a new window, and so on.
Add that new field to your View. Set it to not appear in display, so it can be used later. Move this link above your Title Field in the View, because the order matters.
Edit the Title field settings and use the Link field value as a Token for the Title field.

Put custom links outside weblinks section

How can I put custom links outside the web links section in a salesforce page?
Or is there a way I can create more than one weblinks section?
If not is there a way I can create a custom field that can call a javascript method ? (my custom links calls a js method that after validation will call a web service to do some work.)
I tried creating a custom field (formula) but I wasnt able to call a js function from there, or put some script.
What I want to do is spread my custom links I have in the weblinks section into different sections on the page.
I have used this method to override link and button actions in the past. You could use the same method for move elements around the page too.
Create a visualforce page and use it to override the standard page for the object you want to modify. The override page needs to use the standardcontroller for that object. You can use an extension controller for adding Apex functionality if necessary.
Use the detail tag to render the guts. Then put in a script tag to select the anchor links you want to move around the page. It will take some inspection with your browsers debugger to find exactly what you are looking for.
<apex:page StandardController="CustomObject__c" extensions="CustomObjectController" >
<apex:detail relatedList="false" inlineEdit="true" id="mydetail" />
<script>
// select your elements you want to move, edit or delete here
</script>
</apex:page>

how to open up a VF page in a new tab?

Really new to VF, but here's my VF page. the desired effect is that i want it opened up in a new tab in the same window.
<apex:page standardController="myController__c" extensions="myExtension" action=" {!actionJackson}">
</apex:page>
If your overriding a standard VF page in SFDC your halfway there, it looks like your trying to reference a standard controller of a custom sObject called: 'myController__c', kind of a weird name for an object but if you want to import the standard controller use your objects name as the standardController.
If your custom sObject that you were trying to create a new VF page for was called: "myObject__c" than your page definition would look like:
<apex:page standardcontroller="myobject__c" extensions="class1"></apex:page>
Now go (using the web-ui):
Your Name->Setup->Create->Objects->myObject__c->Standard Buttons and Links->Edit 'View' (lets say you wanted to replace the 'View')
Now choose to override with a VisualForce Page and select the name of your page from the drop down.
Now following the link to view a record in SFDC standard layouts will take you to the new custom vf page. The same goes for edit (if you override it).
Now all you have to do is follow the instructions on SFDC for using and extending the standard controller or standard list controller.

cakephp back button issue

i am working on social network website where user can navigate to the album view page in many ways.
for example.
myprofile>> Gallery index page >> Album view page.
myprofile>> Gallery details page >> Album view page.
In first case back button should go to gallery index page and In second case it should go to Gallery details page.
Is there any way to add link to back button path dynamically in cakephp?
You could try using a breadcrumb-like session array. With every view you can pop a path onto the stack, and access the stack in the view (via the Session Helper) and construct the back button that way.
The stack could be as simple as a single parameter, or an array of controller, action and parameter variables to construct the path, depending on how much detail you need.
Edit: You could also use Neil Crookes' History Component: https://github.com/neilcrookes/cakephp-bits/blob/master/history_component/controllers/components/history.php
Use the breadcrump methods in the Html helper.
In your layout:
echo $this->Html->getCrumbs(' > ','Home');
In your view:
$this->Html->addCrumb('Users', '/users');
$this->Html->addCrumb('Add User', '/users/add');
In each of your views, you can add in a new crumb, or the chain of crumbs to be able to see a history of your actions.
More here: http://book.cakephp.org/view/1653/Creating-breadcrumb-trails-with-HtmlHelper

How to add button or Link to visualforce page whose standard controller is not same as applying tab?

I have visualforce page CompetitorSearch.page that use CompSearchDummy__c as standard controller.
<apex:page StandardController="CompSearchDummy__c" extensions="CompetitorSearch">
If I am to add custom button on the page of CompSearchDummy, CompetitorSearch.page shows up for the page destination.
But I have Talent page which use Talent__c sObject and when I tried to add custom button and attempt to set destination, CompetitorSearch.page does not show up as an option because I did not set Talent__c as standard controller.
Is it possible to somehow add my CompetitorSearch.page link to Talent page?
If I understand your question correctly, you want to add an apex:commandButton to go to another page. When you were on the same page, it was just refreshing itself, but to go to another page, you need to specify an action in the apex:commandButton that points to a method in a controller extension that returns a PageReference for where you want to go. Like this:
<apex:commandButton action="{!gotoCompetitorSearch}" value="Competitor Search" />
public PageReference gotoCompetitorSearch() {
return Page.CompetitorSearch;
}
Note, if you don't really need a button or special logic and just want to go to another page, you can do this with just an apex:outputLink with no need for a controller extension, like this:
<apex:outputLink value="{!$Page.CompetitorSearch}">CompetitorSearch</apex:outputLink>

Resources