• Delinda Tinkey
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies
I have a flow embedded on a VF page and a lightning component with an iframe to the VF page. The VF page renders for me when I log into the community (Napili template), but not when I log in as an external user. I have ensured the external user has access to the VF page.

How can I expose this VF/flow to external users? Here's my lightning component:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
    <iframe src="https://xxx.salesforce.com/apex/my_vf_page" width="100%" height="1000px;" frameBorder="0"/>
</aura:component>
I have a working controller (below) that passes a variable from a flow to a destination URL (finishlocation) when the flow is complete.

As I am still learning APEX, can someone explain how I can get more than one variable from the flow and add it as parameters to my finishlocation?

For example:

PageReference pageRef = new PageReference('/' + flowContactId + ? + Id2 + & + Id3 )....etc.

THANK YOU


Controller:

public class SurveyFlowController {
public Flow.Interview.Survey_Flow_Test myflow {get;set;}
    
// Set the page reference accessor methods
public PageReference finishlocation {
get {
PageReference pageRef = new PageReference('/' + flowContactId );
pageRef.setRedirect(true);
return pageRef;
}
set { finishlocation = value; }
}
 
// Set the accessor methods for the flow output variable

public String flowContactId {
get {
String strTemp = '';
 

if(myflow != null) {
strTemp = string.valueOf(myflow.getVariableValue('varContactID'));
}
return strTemp;
}
set { flowContactId = value; }

}
}


Visualforce Button:
<apex:page Controller="SurveyFlowController" > <flow:interview name="Survey_Flow_Test" interview="{!myflow}" finishlocation="{!finishlocation}" /> </apex:page>
I'm new to VisualForce and would like to use a VisualForce page on a VisualForce tab to allow the current running user to update a field on their user record. The code I have (below) displays everything correctly but does not update the running user's record when saved. What am I missing?

Bonus points if anyone can tell me how to refresh just the enhanced list div on the page every 10 seconds and not the entire page.

Thanks!


<apex:page standardController="User">
<apex:form >
<apex:pageBlock title="My Queue Status" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="1">
<apex:inputField value="{!user.Assignment_Group_Active__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<div>
<apex:enhancedList height="550" listid="00B40000006uQHB"/>
</div>
<script type="text/javascript"> isListLoaded(); function isListLoaded(){ setTimeout("location.reload(true);",10000); }
</script>
</apex:page>
 
Hello, I'm wondering if anyone can help with what I believe is a straight-forward trigger.

We have a contact field called Last_Campaign_Response__c, which is a text field. We have the same field on the account. I'd like the field on the account to be populated with the value from the related contact when:

- the contact is edited and that field's value is updated
- the contact is created (including from a lead convert) and that field is not empty

Thanks!
I have a flow embedded on a VF page and a lightning component with an iframe to the VF page. The VF page renders for me when I log into the community (Napili template), but not when I log in as an external user. I have ensured the external user has access to the VF page.

How can I expose this VF/flow to external users? Here's my lightning component:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
    <iframe src="https://xxx.salesforce.com/apex/my_vf_page" width="100%" height="1000px;" frameBorder="0"/>
</aura:component>
I have a working controller (below) that passes a variable from a flow to a destination URL (finishlocation) when the flow is complete.

As I am still learning APEX, can someone explain how I can get more than one variable from the flow and add it as parameters to my finishlocation?

For example:

PageReference pageRef = new PageReference('/' + flowContactId + ? + Id2 + & + Id3 )....etc.

THANK YOU


Controller:

public class SurveyFlowController {
public Flow.Interview.Survey_Flow_Test myflow {get;set;}
    
// Set the page reference accessor methods
public PageReference finishlocation {
get {
PageReference pageRef = new PageReference('/' + flowContactId );
pageRef.setRedirect(true);
return pageRef;
}
set { finishlocation = value; }
}
 
// Set the accessor methods for the flow output variable

public String flowContactId {
get {
String strTemp = '';
 

if(myflow != null) {
strTemp = string.valueOf(myflow.getVariableValue('varContactID'));
}
return strTemp;
}
set { flowContactId = value; }

}
}


Visualforce Button:
<apex:page Controller="SurveyFlowController" > <flow:interview name="Survey_Flow_Test" interview="{!myflow}" finishlocation="{!finishlocation}" /> </apex:page>
I have a flow embedded on a VF page and a lightning component with an iframe to the VF page. The VF page renders for me when I log into the community (Napili template), but not when I log in as an external user. I have ensured the external user has access to the VF page.

How can I expose this VF/flow to external users? Here's my lightning component:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
    <iframe src="https://xxx.salesforce.com/apex/my_vf_page" width="100%" height="1000px;" frameBorder="0"/>
</aura:component>
I'm new to VisualForce and would like to use a VisualForce page on a VisualForce tab to allow the current running user to update a field on their user record. The code I have (below) displays everything correctly but does not update the running user's record when saved. What am I missing?

Bonus points if anyone can tell me how to refresh just the enhanced list div on the page every 10 seconds and not the entire page.

Thanks!


<apex:page standardController="User">
<apex:form >
<apex:pageBlock title="My Queue Status" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="1">
<apex:inputField value="{!user.Assignment_Group_Active__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<div>
<apex:enhancedList height="550" listid="00B40000006uQHB"/>
</div>
<script type="text/javascript"> isListLoaded(); function isListLoaded(){ setTimeout("location.reload(true);",10000); }
</script>
</apex:page>
 
Hello, I'm wondering if anyone can help with what I believe is a straight-forward trigger.

We have a contact field called Last_Campaign_Response__c, which is a text field. We have the same field on the account. I'd like the field on the account to be populated with the value from the related contact when:

- the contact is edited and that field's value is updated
- the contact is created (including from a lead convert) and that field is not empty

Thanks!

Hi,

I'd like to put up a big screen in our sales department showing a dashboard. But in order for that to be of any interest, data has to be somewhat up-to-date.

My idea was to create a simple VisualForce Page which shows the dashboard and a small piece of JavaScript which clicks the Refresh button every hour.

However, I'm having problems getting the script to actually click the Refresh button. I could get it to work in a Home Page Component but showing the dashboard there isn't really an option.

Does anyone have anything similar running who would be interested in sharing their code?

Thanks.

Søren Nødskov Hansen

  • May 24, 2011
  • Like
  • 0