Problem working with Portals
Hi again. You guys have been incredibly helpful with my other questions. I've been stuck on this current problem since yesterday afternoon. I haven't found anything in the forum that has helped me to solve it. Seems like something so simple though.
I have an app that shows a customer list. User taps on a customer record in that list and is taken to a layout for that customer showing and allowing editing of the customer detail from the customer table.
The left half of the layout is set up to display this customer detail. The right half of the layout contains a tab control. On each of the tabs I am displaying lists of additional related data about the customer contained in related tables. For example, the customer crop history is displayed in a portal as a list for viewing only. Another tab contains the crop pest history.
In the default tab I want to display the call history for this customer (calls made by the sales rep using the app). It displays a portal at the top with a list of calls made, displaying the date and one or two fields to help identify the call. I want the user to be able to tap on one of the calls and display the full detail of the call below the portal on the same tab. My script that is called on the "onobjectenter" event of the field in the portal that is tapped on keeps giving me the error message "This operation cannot be completed because the layout cannot display the result".
The script that is called reads as follows:
Commit Records/Requests [No Dialog]
Go to Related Record [Show only related records; From Table: Tracking2; Using Layout <current layout>]
The layout in question is set to show records from the customer table.
The customer table is related to a table called "tracking" that contains the call data. The relationship is customer:Cust_id<pk> = tracking:cust_id<fk> This should display a one to many relationship of child calls to parent customer.
The tracking table is being displayed in the portal as a call list
I have a second instance of the tracking table called "tracking2". This is the table reference I would use to show the call detail below the portal. It is related to the first instance as follows: tracking:call_id = tracking2:call_id This should be a one to one relationship between the two instances of the tracking table.
Not sure where I'm going wrong. I really didn't want to have to create an entirely different layout to display the call detail. But if that is the only way, so-be-it.
Thanks for any help/advice you can give.