Adding Related Child Records via an Object Create Portal Pag

Posted by Rollbase User on 16-May-2012 15:30

It seems that you can add a Portal Link to add related child records on a Object Create Page. When you click on the link, it navigates away from the Object Create Page without saving thus not creating the parent record. You then go to the related child record object create page, add your related child record, but really it's an orphan record since there is not an parent record to relate to. Also after the child object create, there seems to be no way to return it to the Parent record. (except browser back button) Am I missing something?

All Replies

Posted by Admin on 16-May-2012 16:43

Please create main record first. Than on View page for newly created record you can add another link to create related record.

Posted by Admin on 16-May-2012 16:47

Thanks Pavel,



Wish your answer was different as that affects our workflow but we will adjust!



Can we enter an request to not allow portal links to add related child records on a Object Create portal page? That would prevent this happening.

Posted by Admin on 16-May-2012 17:59

Hi Parker,



We purposely don't restrict what can be added to a Portal page, as we have so many requests for customization that restrictions tend to get removed over time based on requests from other customers. I'd just recommend not adding these links to your create/edit pages. Let me know if I am misunderstanding the issue though.



Thanks,

Matt

Posted by Admin on 16-May-2012 20:11

Matt,



If you can't place an a "add related record" link to an edit page, how do you recommend adding the related records? Obviously, grid control is not always an viable option for adding records.



My initial recommendation to our team has been to add the necessary fields to the parent object, then create a related record using a data map, trigger on update. That is not always a pretty option either.



Any advice is much appreciated.

Parker

Posted by Admin on 16-May-2012 20:40

You can use portal links on the Parent's Page, e.g. New Child Link (from the left-hand components list in the page editor). Alternatively you can create your own by using anchor tags and script components in the Parent's View page.



E.x. *Remove comments



- Get the token from the Token helpers list > Your Portal > New Page of child.

- Place in view page of parent

- on New page of child, add Parent's Lookup field, set to hidden > use record in scope (probably, show record in scope for testing).

- This will auto relate them upon creation of the Child.



Hope this helps,

Piscoso, Martin

Rollbase

Posted by Admin on 17-May-2012 02:10

Hi Parker,



Other than using a Grid component, there is no way to create children from within a New page because you be asking to create the children before the parent record. The model we suggest, if you don't want to use the grid, is only allow creation of child records from the parent record's View page (and use Martin's suggestion above to make sure relationship is set).



Does this help?



Matt

Posted by Admin on 17-May-2012 21:34

Hi Matt,



I understand the implications and the recommended methods. I was just surprised that you recommended against creation of child records from the EDIT page. I am using the methods that Martin mentioned but thanks for validating that this is the right way!



Thanks for your time and the information.



Parker

This thread is closed