August 22, 200520 yr I have two tables related, Calendar and appointments. I have records from Appointments visible in a portal in calendar. I am trying to get a script in calendar to create a new portal row and enter the fields with data from global fields in calendar. It seems to keep writing over the last portal row and not create a new row. How do you create a new portal row (record) and enter data in it? Thanks in advance..
August 22, 200520 yr Do you have "allow creation of related records" checked in the relationship options?
August 22, 200520 yr Author Hi I do have the allow creation of related records checked in the relationship. When I click in the portal on a blank line at the bottom and enter a time in the Appointment:time field it pops up a dialogue that says: "This action cannot be performed because this field is not modifiable." Yet it is a simple time field indexed but no other restrictions and can be edited in that table O.K. The field in the Calendar table is a calculation global field. I can edited and pre-existing row in the portal but I cannot create a new row without getting the above message? Any thoughts??
August 22, 200520 yr Author Yes the related Key field in Appointments is a calculation text field. I can enter the portal manually without a script and change a row with pre-existing data but when I click on the last row for a new portal row entry and enter the data in the field it states "This action cannot be performed because this field is not modifiable." Any thoughts?
August 22, 200520 yr Auto-creation of related records will not work if the related key field is a calculation. If the related key must be a calculation, then you could change your script to set the current key to a global (or pass it as a Script Parameter), go to a layout based on Appointments, create a new record and set its key field with the global (or SP). Then return to the Calendar layout, Commit the record, go to a related field in the portal and then to the last portal row.
Create an account or sign in to comment