Jump to content
Salesforce and other SMB Solutions are coming soon. ×

create records via first portalrow


Recommended Posts

i want to have the last (new) portal row be shown on top of the portal. I want to make an input-mask where the empty last creatable record of the relation is shown above all other related records and not at the bottom. How do i do that??

Link to comment
Share on other sites

You can't — even if you sort the portal in reverse-creation-order (which you can do), so that the most recently created record rises to the top, the EMPTY row is going to stay at the bottom.


You can fake it, but you'll need to use a "Save" or "Submit" button — put global fields directly ABOVE the portal with the button next to them, and the user fills the fields out, hits "Save" or "Submit" and a script goes to last portal row and sets the PortalRelationship::Fields to the values of the global fields and then sets the global fields to blank and commits the record when done.

Link to comment
Share on other sites

You Can't even .....


With 2 relationship , clever defining and a script attached to the blank field in the top portal , You Can


See Attached demo





Link to comment
Share on other sites

Hi engelhardt,


I prefer handling it all behind the scenes (WITHOUT Allow Creation). Have an ADD button above portal. Click button and:


Freeze Window

Go To Layout [ layout based upon portal table occurrence]

New Record

Set Field [ uniqueID ; Get ( ScriptParameter ) ]

Commit Records/Requests [ without dialog ]

Go To Layout [ original layout ]

Go To Portal Row [ first ]

Go to Field [ whatever to start User entry ]


... where the ADD button has script parameter attached of the main record's uniqueID and where the portal is sorted in reverse order of its natural sort state of creation order. When you return to the layout and pop into the first row, you WILL be on the record you just created. Users won't notice a thing. With vs. 8, you can use variables instead of script parameter to hold the uniqueID. I've used many methods mentioned here (and more that I won't admit to). This method is the easiest to implement and also very safe, in my opinion. smiley-laughing


If you don't wish to reverse sort your portal, no prob ... just change Go To Portal Row [ first ] to [ last ] when you return to the layout (and leave your portal unsorted. It will be at the bottom but the User will be right on it - they won't have to scroll to get there which, I assume, is why you don't want that. Now ... if you have more than one portal to same table occurrence it can get tricky. You must select that portal and Arrange > Send To Back to be sure it's the first in stacking order. But that is rare occurrence.



Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Terms of Use