Issues with Record in Scope - Forum - Rollbase - Progress Community

Issues with Record in Scope

 Forum

Issues with Record in Scope

  • Hi all

    Long time Rollbase user (pre Progress days), with what appears to be a curly one, but maybe I'm blind. Certainly couldn't find anything existing in the forum.

    I have an issue with the Record in Scope functionality on Private Cloud 3.0.5.0 (latest). Wondering if anyone has seen it as well or has an idea on a workaround or what the problem might be. 

    I have 3 objects, that are all related. A is related many-to-many to B, B is related one-to-many to C and C is related many-to-one to A. When viewing a record of type A, I select an action of a particular B record listed on the page which creates a new C. The new C page has lookups for both A and B on it, both selected to show record in scope for new records. There are multiple A records which are linked to the same B records (could be different but doesn't have to be).

    The problem is, on the new C record page it selects the wrong record in scope for the A record - ie it doesn't select the A record I just came from on the page before, rather one of the other A records.

    Confusing enough?

  • Hi,

    How did you go to NEW page of C? Is it from the related list from object A VIEW page?

    Regards,

    Orchid

  • It seems to be working fine in my testing, also 3.0.5.0.
    My Setup:

    1. In my parent VIEW page I have related list view of child records, under that list view I have New Child button enabled.

    2. In Child's NEW page I set the parent lookup into Hidden style (which we can enable Show Record in Scope).

    3. From parent View page I click New Child button and I can see in the lookup the parent's value on it, tried also to several Parent records and still seems to be working fine.

    Regards,

    Orchud

  • No, my case is a slightly different setup:

    1. On my parent VIEW page of record A1, I have a related list view of child records B1, B2 and B3. One of the columns in that list view is Workflow Actions for the B records

    2. I click on Workflow Action for B1, whose function is to create a new different child record C (different object to B)

    3. A, B and C are related as per my original post

    4. On the NEW page for object C, I see the lookup for parent record B is correct, but the lookup for parent record A is not, instead of reading A1 it reads A2 which is also related to B1, B2 and B3.

    I have worked around it by adding some javascript code on the VIEW page of A, that adds a parameter to the href attribute on the Workflow Action links in the related list view of B records. The parameter contains the id of the currently viewed A record. Then, on the NEW page for C, another snippet of code looks at the search parameters in the url and if the id of A parameter is present, sets the A lookup to that value.

    Fil

  • Incidentally, the VIEW page of record A, as well as having a related list view of B records, also has a related list view of C records.

  • Hi Fil,

    I tested the said issue but seems to be working fine. I could not replicate the issue.

    Setup:

    - No code involve. No data map.

    - Parent = Warehouse, Child = Product, Child = Depot

    - Warehouse has related list view of Product, Product list view has an Workflow Action with type Related Record - when clicking the action this will redirect to Depot new page

    - Depot new page has two lookups (Warehouse and Product) both are set to Hidden and "Show Record in Scope"

    See images below. All are working fine with any code involve and data map.

    Test First Parent.

    Test Second Parent.

    Try removing any customization or code that you have created. Also if you included a Data Map try removing it in the workflow action.

    Regards,

    Orchid

  • Hi Orchid

    Thanks for that!.

    I have no customizations, code or data maps involved. However, to get things identical, you would need 2 identically named Warehouse records (in my case they are calendar tasks with the same name but different dates) called exactly the same thing, (eg in your case warehouse, notice no auto-number), and relate it to the exact same list of Products, and then on the first Warehouse record, try the action and see what Warehouse record gets picked on the Depot page.

    Hopefully in the next few days I will get a chance to setup a different tenant on the private cloud and try it there from scratch.

    Fil

  • Hi Fil,

    Sorry, I couldn't picture out how does it look like, can you give some screenshots.
    It would help me identify the issue.

    Regards,
    Orchid
  • Will do, but later in the week.

    F

  • No worries, just take your time.

    Regards,
    Orchid
  • Change of plan. Here it is:

    With the following setup:

    Inspection Task Object: Task attribute selected

    Site Object: Workflow attribute selected

    Inspection Object: nothing special selected

    Here are the relationships for Inspection Tasks:

    Here are the relationships for Inspections:

    On the site object, create a workflow action called Inspect which creates an Inspection.

    With that setup, create 3 sites called Site 1, Site 2 and Site 3. Now also create 2 Inspection Tasks as per below:

    Notice they are called the same (not sure if that is relevant or not - will test after posting this), but scheduled for different days.

    On both Inspection Tasks, attach all 3 sites created above. Then, selecting one of the tasks, I have selected the one highlighted in yellow above, you get the following:

    Notice this is ID 52354447. Next, click on the Inspect action for one of the sites. I have clicked on the yellow highlighted one for Site 1. You get the following:

    Which looks fine until you click on the Inspection Task that has been selected from scope. I click on Area 1 highlighted in yellow above and get the following popup:

    Notice the ID is 52354446 instead of the expected 52354447 which is the task I was on on the previous page. Inspecting the element without clicking on Area 1 confirms the wrong ID is selected. 

    It is worth pointing out that the first time I did this, it worked fine - that is, I first clicked on Area 1 (52354446) and selected Inspect and it selected 52354446 from scope for the new inspection, but then I tried it on the second task and it did as you see above. Also, on my production system, it the inspection task record in scope is the later one not the earlier one as here, but I suspect it has to do with the order in which the inspection tasks are viewed??

    The overall effect of this of course, is that the Inspection created does not end up on the Inspection Task being processed and hence it looks to the user that the Inspection didn't get created. Reality is that it is created, but on a different task. 

    HTH, and let me know if I've missed something.

    Fil

  • Hi Fil,

    I tested the same by naming two of my Parents with same Name and added a Task attribute. Unfortunately I could not replicate it going back and forth with parents and clicking the action of a Child record.

    Parent Record List. Same sets of Child records

    Image 1

    Image 2

    I click on same child's workflow action but I fail to replicate the issue, I went back and forth to both parent also detaching and attach back the child records, deleting both parents and create another same name but I still see correct parent's ID. This seems to be working fine.

    Regards,
    Orchid

  • Interesting. I can't think of anything else. I did this on a brand new application and tenant. No extra code anywhere. First one worked, as soon as I went into the second one, it failed, consistently as well, not just once. I'm hosting on Linux, what are you on? Not that that should make a difference.

    F

  • I have windows 3.0.5. can you confirm if I get the same steps.

    1. Parent to child relationship is many:many, Parent has event attribute
    2. Created 2 same name parents. Created child records.
    3. Attached same set of child records to both parents.
    4. Assumed there is already workflow from child. From parent 1 page, click on create action (when in a new page I did not save it), see the same ID from parent record.
    5. Clicked Cancel from the new page upon seeing same ID of parent.
    6. Go to parent list view, View parent 2 and click child create action, same ID as the parent. (did not save the record upon seeing the same ID)

    Regards,
    Orchid

  • 1. Yes many:many (but the other relationship one is One:many)

    2. Yes 2 parents of the same name

    3. Both parents with the same set of child records on the many:many relationship (in my case 3 children)

    4. Yes, workflow on child is create action and I didn't save either

    5. Yes, Cancel

    6. Yes, Back to List, view parent 2 and click on child create action (for the same child as in step 4), and I see the same parent ID as in step 4 instead of the parent id of step 6 :(

    F