AL icon indicating copy to clipboard operation
AL copied to clipboard

[Bug]: Page SourceTableTemporary property not being respected when called from an OnDrillDown trigger

Open Duizy1971 opened this issue 1 year ago • 7 comments

Describe the issue

When calling a page runmodally (or not; I haven't checked that) from an OnDrillDown trigger the SourceTableTemporary property of that page is not being used. It might also have something to do with the fact (see in attached example AL workspace) that it is being called from a cuegroup.

Expected behavior

However a page is called it should respect the SourceTableTemporary setting.

Steps to reproduce

Attached is an AL workspace which has a page "Item Reclassification Card PTE" with source table T83 "Item Journal Line" set as SourceTableTemporary=true. It is setup in the launch as startupObjectId and then an error is not being presented in TempItemJournalLine.Copy(Rec, true); when publish the app from VSC.

But when you call it from the rolcenter page 71001 "Warehouse Scanning PTE" (Please set that page up in Roles (Profiles) and use as default or your Settings) clicking on Activity 'Item Reclassification' it does present you with an error.

The use of DrillDown = true; trigger OnDrillDown()

are the only triggers that can be used.

Lookup = true; trigger OnLookup(var Text: Text): Boolean

or

AssistEdit = true; trigger OnAssistEdit()

also do not work in cue activities. SourceTableTemporaryIssue.zip

Additional context

We are in the process of creating a barcode scanning solution with the mobile app and using cues and activities is the only way to present a warehouse user with finger clickable features.

I will provide a fix for a bug

  • [ ] I will provide a fix for a bug

Duizy1971 avatar Jun 20 '24 08:06 Duizy1971

Sorry about the late reply on this one @Duizy1971. What fix exactly are you proposing to make here? This does more sound like a bug report for the product group, or am I mistaken?

JesperSchulz avatar Sep 16 '24 09:09 JesperSchulz

I'm sorry Jesper,

I don't know in which way I should issue these kind of framework bugs to Microsoft. If you say it should be a bug report for the product group, then I probably agree. I'm not supplying any kind of fix.

Duizy1971 avatar Sep 16 '24 09:09 Duizy1971

In that case the bug report should go through our support channel 😊 I hope the following link gets you started: https://aka.ms/bcsupport.

JesperSchulz avatar Sep 27 '24 11:09 JesperSchulz

What a terrible suggestion. The links on https://aka.ms/bcsupport resorts to more links and ten of them link to support for issues not releated to BC. I am so confused by the way all the different kind of support is being handled. Can you please give me the direct link to the actual place were I can post this issue? I do have ServiceHub support but they do not want to help me with this type of case. BCIdeas is not the place . ALAppExtensions is, I guess, not the place. So were can I go then?

Duizy1971 avatar Sep 27 '24 11:09 Duizy1971

Sorry that the link did not help. I thought the section "Summary of where to file bugs and issues" would point you in the right direction.

As I am from the product group, I can only refer to that page, hoping it is informative enough for partners to take further action. I cannot myself initiate a support case for you.

This repository is only for Business Central extensibility requests or code contributions towards the 1st party Business Central apps. This is also why we clearly show the following template when you create a new issue:

⚠️⚠️ BEFORE WE GET STARTED ⚠️⚠️ This is not the right place to report product defects with customer impact to Microsoft! Issues reported in this repository do not fall under SLAs (Service Level Agreements) and hence have no guaranteed time to mitigation. If your customers are experiencing product defects or you have discovered a severe issue in the product, please follow the steps outlined in https://learn.microsoft.com/dynamics365/business-central/dev-itpro/technical-support to get your issue routed to the right team at Microsoft and to get it treated with the right priority.

We can try to forward this bug to the AL repository, given your request is somewhat related to compilation, and given that support seemingly does not want to assist with this issue.

JesperSchulz avatar Oct 02 '24 08:10 JesperSchulz

Reopening to get triaged in the AL repository.

JesperSchulz avatar Oct 02 '24 08:10 JesperSchulz

Thanks Jesper. I hope it gets picked up next year. I don't think this issue is an easy one.

Duizy1971 avatar Oct 08 '24 13:10 Duizy1971

Hi @Duizy1971,

Using your example, on v25, I see the shareTable error when clicking the role center queue and when I run the 71002 card part directly. When is it that you're not seeing the error?

The documentation clearly states both sides would have to be temporary so as I see it the error is correct. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-copy-method

Did I miss a step in your repro?

SBalslev avatar Jan 28 '25 10:01 SBalslev

I'm currently being held up in hospital. Please keep this issue open and I'll get back to you as soon as possible.

Met vriendelijke groet / Kind regards,

Marcel Duizendstraal

Software Architect

T.

+31 6 34204770

M.

@.***

[https://storage.letsignit.com/5fe9d9be947aea000a6a7a84/generated/effects_62ca5699e17dd8b5c8582602759c111e6066dc25c39ebf5ac094b302.png]

[Duurzaamheid]https://cloud.letsignit.com/collect/b/678a62638f86b0264f09a545?p=xSKbv52R9rh-TBlo1SmhTkgGC6v2koBT4IPk9ls43jnTThQSm4Dan5f7QTee1NZCnoYUjmBgx5vCv0vg3WTnBk-RmrSw4VzCZapWxLUYcGK5NIgErUpDuqXXeZ3_uIRmmmRwH3tyEaJhDz0F2o4iE6y9F_1RaERF938MXaDr6EE=


From: Steffen Balslev @.> Sent: Tuesday, January 28, 2025 11:40:50 AM To: microsoft/AL @.> Cc: Marcel Duizendstraal @.>; Mention @.> Subject: Re: [microsoft/AL] [Bug]: Page SourceTableTemporary property not being respected when called from an OnDrillDown trigger (Issue #7862)

Hi @Duizy1971https://github.com/Duizy1971,

Using your example, on v25, I see the shareTable error when clicking the role center queue and when I run the 71002 card part directly. When is it that you're not seeing the error?

The documentation clearly states both sides would have to be temporary so as I see it the error is correct. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-copy-method

Did I miss a step in your repro?

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/AL/issues/7862#issuecomment-2618623101, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHG65CRM63PNVR4TNDXNCUL2M5NDFAVCNFSM6AAAAABPHE6CZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYGYZDGMJQGE. You are receiving this because you were mentioned.Message ID: @.***>

Duizy1971 avatar Jan 28 '25 10:01 Duizy1971

Well that was stupid of me. No idea why I had this brain fart last year. Ofcourse it should be:

                trigger OnDrillDown()
                var
                    TempItemJournalLine: Record "Item Journal Line" temporary;
                begin
                    Rec.CopyFilter("Location Filter", TempItemJournalLine."Location Code");
                    Page.Runmodal(Page::"Item Reclassification Card PTE", TempItemJournalLine);
                end;

The documentation clearly states both sides would have to be temporary so as I see it the error is correct. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-copy-method

clearly states the correct way of calling such a temporary page. I'll close this issue now.

P.S. Using BC pages on Android as a scanning solution is not viable. Way to much white space wasted on a QHD mobile screen. Just six and a half controls can be made visible at any time on a card page. We'll stick with Tasklet although it is way to expensive for smaller customers.

Duizy1971 avatar Mar 06 '25 10:03 Duizy1971