Importing Security Filters with a Dataport

jorgebraga
Member Posts: 25
Hi all of u!
I'm trying to import permissions from an Excel sheet using a Dataport.
The Permission Table (2000000005) is defined as follows
Field No. Field Name Data Type Length Description
1 Role ID Code 20
2 Role Name Text 30
3 Object Type Option
4 Object ID Integer
5 Object Name Text 249
6 Read Permission Option
7 Insert Permission Option
8 Modify Permission Option
9 Delete Permission Option
10 Execute Permission Option
11 Security Filter TableFilter
My poblem is precisely the Security Filter. I cannot use it in a Dataport.
The error states that the data type TableFilter is invalid for the Source expression.
How can we solve this problem?
Aditional info: NAV 3.70 SQL Server Dataport works fine if Security Filter is not used (BY I NEED IT BAD)
Txs in advance 4 your time
I'm trying to import permissions from an Excel sheet using a Dataport.
The Permission Table (2000000005) is defined as follows
Field No. Field Name Data Type Length Description
1 Role ID Code 20
2 Role Name Text 30
3 Object Type Option
4 Object ID Integer
5 Object Name Text 249
6 Read Permission Option
7 Insert Permission Option
8 Modify Permission Option
9 Delete Permission Option
10 Execute Permission Option
11 Security Filter TableFilter
My poblem is precisely the Security Filter. I cannot use it in a Dataport.
The error states that the data type TableFilter is invalid for the Source expression.
How can we solve this problem?
Aditional info: NAV 3.70 SQL Server Dataport works fine if Security Filter is not used (BY I NEED IT BAD)
Txs in advance 4 your time
0
Answers
-
have you tried to asign the value to a text variable and then export. And do the same when you import.0
-
If you don't use it, don't put it in the dataport.
If you use it, you have to use a text-variable in the dataport and
in the "OnBeforeExportRecord()" puttxtSecurityFilter := FORMAT("Security Filter");
and in the "OnBeforeImportRecord()" puttxtSecurityFilter := '';
and in the "OnAfterImportRecord()" putEVALUATE("Security Filter",txtSecurityFilter); IF "Role ID" = 'SUPER' THEN CurrDataport.SKIP; // this because I think it will give an error on the SUPER-role
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Guys txs a lot for your help.
It works just fine (And it was very simple to do with your tips).0 -
Thanks kriki for writting to code. Don't have the time to write it.0
-
Didn't take me that much time to write it.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
that is still time0
-
I guess it's only work if u didn't put any filter on security filter.
How bout if we put filter on it? I tried but can't work for imported the filtering.
CMIIW0 -
Does it give an error? And in that case: which error?Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
No error, but the security filter not inserted, only blank.
But i have worked with it.
I added Clear then it's worked
Thx0
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