• john san
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

I've been searching and tried a few different ways to do this...I'm stuck.  Here is what I've done so far.

 

https://www.evernote.com/shard/s19/sh/11e2cdc9-1451-4eae-977f-d25de853bcc1/3ecf53232ad644a765bac79cdd14fbe1

 

The requirement is to be able to have users read/accept a user policy one time.  I've seen several posts about this, but no answer that seems to work.  I'm hopeful someone could lend a hand.

 

Thanks!

 

I'm stuck...trying to coble together code from others here.  Trying to create a page that displays only if a boolean field on the User object is not checked.  Once the user reads/accpts the user acceptance policy the page will not display.  I want this popup to override everything so they cannot bypass it.

 

I added a custom attribute to the user object:  AcceptableUseAgree

I have the following controller:

 

public class popup {

public boolean displayPopup {get; set;}
public boolean AUPok;

public popup() {
ID uID = UserInfo.getUserId();
AUPok = [SELECT AcceptableUseAgree__c FROM User
WHERE Id = :uID].AcceptableUseAgree__c;
}

public void closePopup() {
displayPopup = false;
}

public void showPopup() {
displayPopup = !AUPok;
}
}

 

Here is the page someone else posted.  This page has a button with an action that displays the popup.  However, I want the popup to display if the AcceptableUseAgree__c is false.  How do I do this?

 

<apex:page controller="popup">
<apex:form >

/*
<apex:commandButton value="Show Pop up" action="{!showPopup}" rerender="popup"/>
<apex:pageBlock >
Lorem ipsum ..... dummy stuff to show the popup is above content
</apex:pageBlock>
*/

<apex:outputPanel id="popup">
<apex:outputPanel styleClass="customPopup" layout="block" rendered="{!displayPopUp}">
Lorem ipsum <br/><br/><br/>
<apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="popup"/>
</apex:outputPanel>
</apex:outputPanel>

</apex:form>

<style type="text/css">
.customPopup{
background-color: white;
border-style: solid;
border-width: 2px;
left: 0%;
padding:10px;
position: absolute;
z-index: 9999;
/* These are the 3 css properties you will need to tweak so the pop
up displays in the center of the screen. First set the width. Then set
margin-left to negative half of what the width is. You can also add
the height property for a fixed size pop up.*/
width: 100%;
margin-left: 0px;
top:0px;
height: 100%
}
</style>
</apex:page>

 

I've been searching and tried a few different ways to do this...I'm stuck.  Here is what I've done so far.

 

https://www.evernote.com/shard/s19/sh/11e2cdc9-1451-4eae-977f-d25de853bcc1/3ecf53232ad644a765bac79cdd14fbe1

 

The requirement is to be able to have users read/accept a user policy one time.  I've seen several posts about this, but no answer that seems to work.  I'm hopeful someone could lend a hand.

 

Thanks!

 

I'm stuck...trying to coble together code from others here.  Trying to create a page that displays only if a boolean field on the User object is not checked.  Once the user reads/accpts the user acceptance policy the page will not display.  I want this popup to override everything so they cannot bypass it.

 

I added a custom attribute to the user object:  AcceptableUseAgree

I have the following controller:

 

public class popup {

public boolean displayPopup {get; set;}
public boolean AUPok;

public popup() {
ID uID = UserInfo.getUserId();
AUPok = [SELECT AcceptableUseAgree__c FROM User
WHERE Id = :uID].AcceptableUseAgree__c;
}

public void closePopup() {
displayPopup = false;
}

public void showPopup() {
displayPopup = !AUPok;
}
}

 

Here is the page someone else posted.  This page has a button with an action that displays the popup.  However, I want the popup to display if the AcceptableUseAgree__c is false.  How do I do this?

 

<apex:page controller="popup">
<apex:form >

/*
<apex:commandButton value="Show Pop up" action="{!showPopup}" rerender="popup"/>
<apex:pageBlock >
Lorem ipsum ..... dummy stuff to show the popup is above content
</apex:pageBlock>
*/

<apex:outputPanel id="popup">
<apex:outputPanel styleClass="customPopup" layout="block" rendered="{!displayPopUp}">
Lorem ipsum <br/><br/><br/>
<apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="popup"/>
</apex:outputPanel>
</apex:outputPanel>

</apex:form>

<style type="text/css">
.customPopup{
background-color: white;
border-style: solid;
border-width: 2px;
left: 0%;
padding:10px;
position: absolute;
z-index: 9999;
/* These are the 3 css properties you will need to tweak so the pop
up displays in the center of the screen. First set the width. Then set
margin-left to negative half of what the width is. You can also add
the height property for a fixed size pop up.*/
width: 100%;
margin-left: 0px;
top:0px;
height: 100%
}
</style>
</apex:page>

 

I have a user requirement for a user to accept a terms of service agreement after they log in.

 

Their acceptance will be recorded and then they are to be allowed to access the partner portal.

 

So far I have tried using different forms of site.login starturl and pagereference redirects with out any success. The custome login page always takes me to the associated partner portal for the login associated to the site.

 

return

Site.login(username, password, '\visualforcepagename');

 

I would like to direct the user through the terms of service page on login or redirect them to it when the get into the portal if they have not accepted the terms.

 

 

Hi,
I want to display Use Policy(i.e., check box) as a pop-up as soon as they login to Salesforce for the first time. This should happen for existing users who are going to see Chatter for the first time or new SF users. User should not be able to proceed till the User policy has been accepted. 
Also we need to track the acceptance to the Use Policy(add attribute to User record, maybe date and time to track who has accepted to have read the policy)
Please share your thoughts like how can we achive this. 
Also share us with sample files if any..
Thanks in advance..
 

i want to create a popup windowwith a message  that should come every time a user logs into salesforce