2 Replies Latest reply on Aug 13, 2014 12:31 PM by ruhlanma

    Problem working with Portals

    ruhlanma

      Title

      Problem working with Portals

      Post

           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:

               Freeze Window

               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.

            

            

        • 1. Re: Problem working with Portals
          philmodjunk

               There is a mismatch here that results in this error message:

               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.

               Since you use the <Current layout> designation, you are staying on a layout based on the customer table, but the GTRR script step requires a layout based on Tracking2.

               You either need to specify a layout based on an occurrence of Tracking (any table occurrence of tracking will work for the layout) or you'll need to use a different method for displaying this detail info. A popover located outside the portal, but opened by this script using go to object comes to mind as a way to display the details of this call record.

          • 2. Re: Problem working with Portals
            ruhlanma

                 Thanks Phil.  I did resolve it by using the layout based on the occurrence of tracking.  I don't want to mess around with multiple windows at this point.  Maybe in phase 3. 

                  

                 Thanks for the help