Application record access from the portal pages

Posted by ithrees on 08-Jul-2014 01:40

Hi all,

I have a situation in rollbase that I need to access a record in both ways (read and update) from the generic type portal pages.

I use this application to maintain the data collected from the list of user using rollbase portal. It navigates between many portal pages according to the user selection and I need to remember the current user's information between pages and also need to update the same user record from different portal pages with user entered data.

Can you please help me to find out the best possible practice for the above purpose.

Thank you in advance.

All Replies

Posted by Orchid Corpin on 08-Jul-2014 09:48

Hi ithrees,

Have you created a View and Update pages already for that object?

Is the record that you want to edit or view in the generic page is a portal user?

Thanks,

Orchid

Posted by pvorobie on 08-Jul-2014 12:21

You can use client-side API rbf_updateRecord to update a record from generic Portal page.

Posted by ithrees on 09-Jul-2014 01:34

Hi Orchid,

Thank you for your reply,

You mean the object view portal page and object edit portal page..? I haven't create them as I am not allowing portal users to update the fields directly.

Here what I do is a kind of survey and it contains different navigation according to user's selection. I am handling these navigation with custom buttons and javascript portal page calls. And I want to read and update the current user's record programmatically (of course something to hide from the user) when the user is in different pages(avoiding default 'submit' button and destination page setting).

And Yes, this for anonymous portal users without any authentication. Hope you understand what I am up to..

Thanks again.

Posted by ithrees on 09-Jul-2014 03:07

Hi pvorobie,

Thank you for your reply,

I also tried with client-side APIs but I'm getting an error message "Error: Portal <portal name> does not allow AJAX calls for non-authenticated visitors" even though I have given access to view and edit the object for the portal visitor.

Am I missing anything else..?

Thank you again.

Posted by pvorobie on 09-Jul-2014 11:09

You can allow AJAX calls for non-authenticated portal visitors on Portal Edit page.

However please realize that this way a complete strange (including bot) can modify your data in DB.

Thanks,

Pavel Vorobiev

Posted by ithrees on 10-Jul-2014 00:15

Thanks Pavel, I have the access now.

I totally agree with you that there is a risk in giving access like this, and I am also looking for a way to trigger server side api to update the record for the client side changes. Please suggest me any on this.

This thread is closed