Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Permission Set for Email Outbox (8888) - preventing action

Posted on by 130

Hi All,

as per my understanding of AL code now, recordREF and fieldREF are to be used when referencing protected tables and fields.

Code is below, along with errors from BC.

  • I have the PK - but when using .FIND method (as seen here) it returns back with error that ID does not exist.....but it certainly does
  • When using GET method, the permissions error appears
    • Tried to set permissionset using Tableextension for 8888 - did not seem to help

Appreciate any help here, I am super close....but can't access the record!

pageextension 60031 pExt60031EmailEditor extends "Email Editor"
{


    actions
    {
        modify(Send)
        {
            trigger OnBeforeAction()
            var
                emailOutBoxRecordRef: RecordRef;
                currentEmailRecordID: RecordId;
                idFieldRef: FieldRef;
                descriptionField: Text[100];
            begin
                emailOutBoxRecordRef.Open(8888);
                idFieldRef := emailOutBoxRecordRef.field(1);
                idFieldRef.Value := Rec.Id;
                if emailOutBoxRecordRef.Find('=') then
                    descriptionField := emailOutBoxRecordRef.Field(6).Value;

            end;
        }
    }
}

objectID.png

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,171 Super User 2024 Season 2 on at
    RE: Permission Set for Email Outbox (8888) - preventing action

    Hi, I checked table 8888 "Email Outbox". The table itself and the Id field are accessible via tableextension. But the Access property of other fields is Internal, such as the emailOutBoxRecordRef.Field(6) you need to use.

    pastedimage1685059072820v1.png

    pastedimage1685059217179v3.png

    This value is only accessible to Microsoft apps.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-access-property

    Hope this helps.

    Thanks

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,151 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,993 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans