Portal Page Flow - Creating a "Child" record (with

Posted by Rollbase User on 27-Feb-2012 20:46

Hi, I am trying to create a flow in a "portal," and I want to create a record without having to open a page. Here's the flow I want to create - User Log-in (leads to PortalUser Dashboard) - PortalUser Dashboard - Click on Link "Start a New session" (Leads to Session Creation) - Session Creation (PortalUser Name is automatically populated, and the name of the session is automatically generated) -- (Leads to Elements Creation) - Element Creation (the Session Name is automatically populated) Because there is nothing for the user to "type-in" for the "Session," I would like to get the session to be automatically created, and automatically go to the "Elements Creation" screen (with the newly created Session name automatically populated) This will allow me to reduce the number of steps that the PortalUser will go through. Thanks for your help

All Replies

Posted by Admin on 27-Feb-2012 22:41

Perhaps you can use ObjectScript trigger which has access to server-side API. Please check Chapter 6 for more info.

Posted by Admin on 27-Feb-2012 22:44

Hi,



On the page session creation on your portal, go to the properties of this and on the destination page picklist set it to be directed to your new element page.



Then, on the onload property of the page, place this code, document.theForm.submit(); and save your page.



Now to make it seamless to the portal user, edit your new session page and add a script component containing this code.

remove comments.



This will hide the contents of the page while it creates the session record.



Now, going to your new element page which is the redirect of the new session page, add the session lookup to this page and make it use record in scope then probably make it hidden as well.



Thanks

Piscoso Martin

Posted by Admin on 28-Feb-2012 19:12

Thank Martin and Pavel for your help,



Sorry for the delay in responding, I was away on business.



Martin, I have tried to do what you offered, but I'm not getting the results that I should get -- I must have screwed-up something, I am just learning to work with Javascript -- please see below for my comments and further info based on the steps you proposed.



1 .

On the page session creation on your portal, go to the properties of this and on the destination page picklist set it to be directed to your new element page.

--- Done



2.

Then, on the onload property of the page, place this code, document.theForm.submit(); and save your page.

--- I had other code present in the onload, so here is what the code looks



like.rbf_setFieldValue(AppUser, {!R47478968.name#link})

document.theForm.submit();



3.

Now to make it seamless to the portal user, edit your new session page and add a script component containing this code.

remove commen

Posted by Admin on 28-Feb-2012 22:50

Hi



For number 2, the submit should be on the onload of the new session page and not the new element page , also, kindly check the setfieldvalue call, syntax seems to be wrong, this will stop your script before it gets to the submit .



Syntax should be rbf_setFieldValue ('fieldname','value'); encapsulating in a string will ensure code continuity .



Kindly revisit your onload, or remove your onload first to test the functionality of the script I gave.



And I see your using #link for your setfield, note that this renders as a url , you can use #text for the text value and then no suffix if you need for the ID.



For number 3, remove the comments which is as well as the remove comments words. I just added that so you can see the code here in the forums.



Thanks

Posted by Admin on 01-Mar-2012 16:34

Martin,



Thanks, you're a savior! You were right on all counts.



I'm learning more and more the syntax, so I'll become better at catching syntax errors.



Thanks again.



Marc

This thread is closed