function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SurenderSurender 

pop-up for the first time in salesforce - Urgent!!!

Hi,
 
As we are new to salesforce development, can someone briefly explain how we can achive the below urgent requirement.
 
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).
 
Also share us with sample code/examples if any..
 
Thanks in advance..
yvk431yvk431

I cant provide any code examples as I dont have one.

 

Hope you have sites enabled for your Org . Then we can redirect the users to a default page  where we can have our logic.

The UI will be based on the Check Box selection which will be stored in the database.

 

When the user logs in for the first time, he will be redirected to the page with the checkbox selection, once the user selects the checkbox and hits the button, the selection will be stored in the database and redirected to the home page . After the selection if the user logs in again, he will directed redirected to the home page.

SurenderSurender

Hi,

 

I am able to achieve this by having custom link in the Home tab(in the Side bar) and when the user clicks on the link, UI will be displayed based on Checkbox selection which is stored in db.

 

But our requirement is to have the similar logic but without invoking any actions from the sidebar.

 

Can you please share your thoughts on this..

 

 

yvk431yvk431

So I guess you dont have any Sites setup for your Org and you to implement this.

 

The other way is to go for a Home Page Component. If a user is redirecting to the home page after successful login, we can still perform some logic using the Home Page Components with the help of javascript.

 

You can create a custom Home Page Component which will be loaded when ever the home page is called . So if we write any ascript here , it will get executed automatically when the user logs in.

 

 

This should suffice your requirement. Sorry for not being so descriptive as I cant spend much time.