Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request-For-External] Codeunit 454 "Job Queue - Send Notification" - Procedure from Internal to Global #28193

Open
MH1612 opened this issue Feb 21, 2025 · 0 comments

Comments

@MH1612
Copy link

MH1612 commented Feb 21, 2025

Describe the request

Hello, we need the following currently Internal procedure to be set as Global. Can you please check this? Thank you!

    procedure SetURL(var JobQueueEntry: Record "Job Queue Entry"; var RecordLink: Record "Record Link")
    var
        Link: Text;
    begin
        // Generates a URL such as dynamicsnav://host:port/instance/company/runpage?page=672&$filter=
        // The intent is to open up the Job Queue Entries page and show the list of "my errors".
        // TODO: Leverage parameters ",JobQueueEntry,TRUE)" to take into account the filters, which will add the
        // following to the Url: &$filter=JobQueueEntry.Status IS 2 AND JobQueueEntry."User ID" IS <UserID>.
        // This will also require setting the filters on the record, such as:
        // SETFILTER(Status,'=2');
        // SETFILTER("User ID",'=%1',"User ID");
        Link := GetUrl(DefaultClientType, CompanyName, OBJECTTYPE::Page, PAGE::"Job Queue Entries") +
          StrSubstNo('&$filter=''%1''.''%2''%20IS%20''2''%20AND%20''%1''.''%3''%20IS%20''%4''&mode=View',
            HtmlEncode(JobQueueEntry.TableName), HtmlEncode(JobQueueEntry.FieldName(Status)), HtmlEncode(JobQueueEntry.FieldName("User ID")), HtmlEncode(JobQueueEntry."User ID"));

        RecordLink.URL1 := CopyStr(Link, 1, MaxStrLen(RecordLink.URL1));
    end;

Additional context

Use it form another system part. It would also be great if the procedure will be centralized.

Please note, the HtmlEncode-Procedure in this codeunit could be replaced with the same procedure in "Type Helper"-Codeunit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant