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

Preventing manual row insertion in portal


chrgosselin
 Share

Recommended Posts

Hi,

 

Is there a way to prevent a user from manually inserting rows in a portal (by clicking on the last row) and still allow row insertion via a script (e.g. Add new row) activated by a button?

 

Thanks for your help,

 

Christian

Link to comment
Share on other sites

Hi Christian

 

Yes there is and it's not so difficult. In the relationship graph, double click on the relation linky icony thingy to open its settings. deselect the "allow creation of records through this relationship" box. click OK to exit.

 

Then a script:

 

#you're in the main table
set variable [$ID ; MainTable:::MainTableID ]
freeze window
# now go to the child table
go to layout [child]
new record /request
set field [ChildTable::MainTableID ; $ID ]
# and get back
go to layout [ original ]
commit records /requests

 

If the portal records are sorted by auto-enter timestamp, descending (so the most recent record is on top) you can add:

 

go to portal row [first]

go to field [ChildTable::DataField]

 

so the cursor is in place for the user to start entering data.

 

kjoe

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use