Trigger vs login problem

rixrix
Member Posts: 121
Hello,
We observed strange situation.. One Item Card with existing ILE Entries was somehow deleted and [item No_] in ILE table is Blank.
Nobody (even not programmers) knows how it happened. Obviously if there is Ledger Entry, Item card is undeletable ....
Has somebody observed such problem?
But what I wanted to ask is:
I wanted to log all delete queries on Item table (not only that made from NAV).
I made (directly on SQL Server) trigger for Item table (on DELETE) which inserts some info rows into another table in different database (specially created for this purpose)
I set up all rights, created logins in security tab and so on, but the problem is that (when deleting item card in NAV) for some users it works perfectly but for some of them it gives: Combination of password and login is not valid.
(when I delete trigger, all works as usual)
Can you help me?
I may try to move "Dellog table" into NAV DB, but I wanted it separated
Thank you
We observed strange situation.. One Item Card with existing ILE Entries was somehow deleted and [item No_] in ILE table is Blank.
Nobody (even not programmers) knows how it happened. Obviously if there is Ledger Entry, Item card is undeletable ....
Has somebody observed such problem?
But what I wanted to ask is:
I wanted to log all delete queries on Item table (not only that made from NAV).
I made (directly on SQL Server) trigger for Item table (on DELETE) which inserts some info rows into another table in different database (specially created for this purpose)
I set up all rights, created logins in security tab and so on, but the problem is that (when deleting item card in NAV) for some users it works perfectly but for some of them it gives: Combination of password and login is not valid.
(when I delete trigger, all works as usual)
Can you help me?
I may try to move "Dellog table" into NAV DB, but I wanted it separated
Thank you
0
Comments
-
I think that the difference in the users for which it works and doesn't work is, that some are sysadmins and some aren't.
You can try to create stored procedure in the second DB to write the log, and execute this stored procedure from the trigger. You can then set the stored procedure as "Execute as ..." to execute it under some account, which have rights to write into the target table.0 -
Thank you very much.
Will try it.
If it works it will be more elegant solution for me.0 -
rixrix wrote:Hello,
We observed strange situation.. One Item Card with existing ILE Entries was somehow deleted and [item No_] in ILE table is Blank.
Nobody (even not programmers) knows how it happened. Obviously if there is Ledger Entry, Item card is undeletable ....
Has somebody observed such problem?
Its not a problem, its a standard feature of Navision that has been there since the DOS version. Its quite normal.David Singleton0 -
Unwanted removing data is Standard? and feature?
Does it happen accidentaly?
As we know nobody from users was doing anything what could do it.
And as I know also our NAV implementation should not do it (impl. company people said it :-).
+
kine:
I was thinking about it, but I am not sure if I can insert multiple rows through stored procedure.
The trigger is inserting all rows selected from virtual "deleted" table0 -
Call the SP for each row in the deleted table... ;-)0
-
rixrix wrote:Unwanted removing data is Standard? and feature?
Does it happen accidentaly?
As we know nobody from users was doing anything what could do it.
And as I know also our NAV implementation should not do it (impl. company people said it :-).
Did you test it? Did you hit F4 on on item?David Singleton0 -
Of course I tested it
I can not delete Item if there are ILE entries or if there are some Purchase/Sale documents (Item is being purchased/sold)
That's why we are confused.0 -
In standard NAV, you can delete the Item card, if there are no open documents for it (Sales, Purchase, BOM, Service, Req. journal, Prod. orders).0
-
rixrix wrote:Of course I tested it
I can not delete Item if there are ILE entries or if there are some Purchase/Sale documents (Item is being purchased/sold)
That's why we are confused.
Hi
You can delete an item when its ILE are all closed ("open" flag to false).
Bye
MatteoReno Sistemi Navision Developer0 -
In normal NAV yes, but we have implemented some security which disallow this ....
And we tested that it works.
That's why it's so strange ... like some routine bypassed this, but we do not know which one and when ....
Programmers said, they do not see where in code it could be possible ...
:-(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