Security Filtering using Extension in AL Code

johanna
Member Posts: 369
Issue :
When I use security filter in field "Code" in table "No. Series", I get error "A security filter has been applied to table No. Series. You cannot access records that are outside that filter" when create new Sales Order.
I debug and it break on code below in function "CheckNumberSeries" (codeunit 1400) :
IF RecVariant.ISRECORD AND (NoSeriesCode <> '') AND NoSeries.GET(NoSeriesCode) THEN BEGIN
In NAV, I will add code like below.
NoSeries.SecurityFiltering := SecurityFilter::Ignored; //my additional code
IF RecVariant.ISRECORD AND (NoSeriesCode <> '') AND NoSeries.GET(NoSeriesCode) THEN BEGIN
..
How to do this using extension with AL Code in Business Central?
In extension, I cannot add code
Please help.
Thank you.
**To Reproduce**
Steps and to reproduce the behavior:
1. Go to Permission
2. In table No. Series, add security filter on field "Code" (for example : 101-A..101-Z)
3. Create No. Series Code (for example : 100-SO, 101-SO, 102-SO)
3. Create new Sales Order (error "A security filter has been applied to table No. Series. You cannot access records that are outside that filter")
**Expected behavior**
I can create new Sales Order without any error.
**Versions:**
- AL Language: 4.0.209944
- Business Central: 14.0.36457
When I use security filter in field "Code" in table "No. Series", I get error "A security filter has been applied to table No. Series. You cannot access records that are outside that filter" when create new Sales Order.
I debug and it break on code below in function "CheckNumberSeries" (codeunit 1400) :
IF RecVariant.ISRECORD AND (NoSeriesCode <> '') AND NoSeries.GET(NoSeriesCode) THEN BEGIN
In NAV, I will add code like below.
NoSeries.SecurityFiltering := SecurityFilter::Ignored; //my additional code
IF RecVariant.ISRECORD AND (NoSeriesCode <> '') AND NoSeries.GET(NoSeriesCode) THEN BEGIN
..
How to do this using extension with AL Code in Business Central?
In extension, I cannot add code
Please help.
Thank you.
**To Reproduce**
Steps and to reproduce the behavior:
1. Go to Permission
2. In table No. Series, add security filter on field "Code" (for example : 101-A..101-Z)
3. Create No. Series Code (for example : 100-SO, 101-SO, 102-SO)
3. Create new Sales Order (error "A security filter has been applied to table No. Series. You cannot access records that are outside that filter")
**Expected behavior**
I can create new Sales Order without any error.
**Versions:**
- AL Language: 4.0.209944
- Business Central: 14.0.36457
Best regards,
Johanna
Johanna
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions