Skip to main content

Notifications

Announcements

No record found.

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

Permission Set for Email Outbox (8888) - preventing action

(0) ShareShare
ReportReport
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 75,561 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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans