Creating Portal Credentials from Existing Records

Posted by Rollbase User on 08-Aug-2012 18:02

How do I set/create Portal Visitor credentials (username and temporary password) automatically for records that will be created/exist in RB? Specifically, I'm trying to do this for the User Object and a Customer Object (both have Portal Visitor attribute). Our product is a B2B solution, and hence all customer/user information will be created within RB, so we can't have the Visitor register again as shown in the video example for creating a partner portal. Our intent is to have RB automatically create the credentials and we'll run a Trigger to email them to the Visitor like the "Welcome To Rollbase" email template. It would seem we could set the credentials by running a Field Update Trigger. But I cannot figure out how to set the temporary password as done in the "Welcome To Rollbase" email template. Plus, after setting the Portal Visitor attribute on the User Object, RB did not create a Password field. Thanks in advance for any pointers or suggestions.

All Replies

Posted by Admin on 08-Aug-2012 19:14

Portal visitor (not User) does have "password" field - although it may not b automatically added to every page.



To notify Visitor about assigned credentials you can do the following:

1. Create Mail template:



Your login name: {!loginName}



Password: {!password}



Login URL: {!#PORTAL.50345214.50345224#url}





2. Create "Send Email" trigger to run on Visitor Create and configure it to send template above.



Note: Password field must have "Show actual password on view pages and email templates" box checked.

Posted by Admin on 08-Aug-2012 20:20

Hi Pavel -



1. The Login URL you show is just an example, not the one for my portal, right?

2. Do I set the values of {!loginName} and {!password} via a trigger event? Do I have to write a routine to somehow generate a temporary password for the Visitor, or is there a RB function for this?

3. When I create a "Send Email" Trigger, there is no option "Visitor Create"? The only options are Before Create, After Create, Before Update, After Update, Before Delete, After Delete, On Login, On Logout.

4. When viewing the fields for User, the password field is not shown. Per your note above, how can I change the attributes of that field if I can't get to it?



Thanks!

Posted by Admin on 08-Aug-2012 21:50

1. URL token is just an example. You can find all available tokens in "Portals" section of template helper.

2. There are many ways to create a record in Rollbase. Using UI is simplest. Others are spreadsheet import, API call etc.

3. Use "After Create" option.

4. User is special case. You just create a record (from API, for instance) - the system will assign temporary password and send "Greetings" email.

Posted by Admin on 09-Aug-2012 10:40

Hi Pavel - I'm going to try to get 1 portal working, starting with my Customer Object. I am simply using the UI to manually populate the fields for loginName and password. I have a trigger that sends a welcome email with the credentials and portal URL. That all works fine. I log out of all my RB instances, then click the URL and get the login screen. But when I enter the loginName and password and submit the form, RB throws an error "Error: Your account has been deactivated".

Posted by Admin on 09-Aug-2012 11:37

It looks like "Is Active" checkbox is unchecked for your newly created record.



This is strange since it is supposed to be checked by default. Please attach screen captures for more info.

Posted by Admin on 09-Aug-2012 14:32

Amazing. Don't know how I did that, but of course that was the problem. Of all the test customers in the system, the one I was using had IsActive unchecked. I didn't even have that field on the UI so I'm not sure how it got unchecked. But the first portal appears to be working now. Thanks!!!



BTW - I just noticed you made the update to include column width for fields. That was really fast. Thanks so much!

Posted by Admin on 09-Aug-2012 15:30

Yes, you can specify width of columns in pixels or %.

Posted by Admin on 10-Aug-2012 10:15

Hi Pavel - I'm now trying to create a User portal. I'm confused. I have created a test portal on the User object (just like the one that's working for my Customer Object). The User Object has the Portal Visitor attribute turned on. But when I view the User fields, there are none related to Visitor. Without the IsActive field and the Visitor username/password fields, how do I give User's access to a portal and manage access?



For giggles I tried to use my standard RB User credentials to log into the User portal but I get the following error:



"Application Error

Your request could not be completed because:

Cannot find data record with id 50844525"

Posted by Admin on 10-Aug-2012 11:28

User is a system object. It is different in some ways from regular Objects.



Regarding error: I can't say more unless I have more info. Please submit support request.

This thread is closed