approval management

Amaraa
Member Posts: 153
Hello,
When I try to send approval request it is giving me error that User xxx doesn't exist in User Setup table.
Then I went to code and I found out this in codeunit 439.
How could this ever can be possible? (Right me if I am wrong).
And it is default code.
And now what shall I do get rid of the error?!
Thanks,
Amaraa
When I try to send approval request it is giving me error that User xxx doesn't exist in User Setup table.
Then I went to code and I found out this in codeunit 439.
How could this ever can be possible? (Right me if I am wrong).
And it is default code.
UserSetup.SETRANGE("User ID",UserSetup."Approver ID"); IF NOT UserSetup.FIND('-') THEN ERROR(Text005,USERID);
And now what shall I do get rid of the error?!
Thanks,
Amaraa
0
Answers
-
oh, this is funny...
UserSetup.SETRANGE("User ID",UserSetup."Approver ID"); IF NOT UserSetup.FIND('-') THEN ERROR(Text005,USERID);
you can notice that the error returns the System variable "USERID", but the filter is done with the value of UserSetup."Approver ID"...try to check (with a message, for example) if USERID and "Approver ID" has the same value.
EDIT: the easiest solution to check the value is to change thisERROR(Text005,USERID);
toERROR(Text005,UserSetup."Approver ID");
0 -
Belias wrote:oh, this is funny...
UserSetup.SETRANGE("User ID",UserSetup."Approver ID"); IF NOT UserSetup.FIND('-') THEN ERROR(Text005,USERID);
you can notice that the error returns the System variable "USERID", but the filter is done with the value of UserSetup."Approver ID"...try to check (with a message, for example) if USERID and "Approver ID" has the same value.
EDIT: the easiest solution to check the value is to change thisERROR(Text005,USERID);
toERROR(Text005,UserSetup."Approver ID");
0 -
:-k i'm not sure to understand you...what do you mean?probably tha:
it's not common to use a value of a field of the table we're filtering as a filter value, but it's useful sometimes...i think that it is used to group records with the same user id field, but i've never took a deep look at this codeunit...
and what about your problem?did you solve it?0 -
Belias wrote::-k i'm not sure to understand you...what do you mean?probably tha:
it's not common to use a value of a field of the table we're filtering as a filter value, but it's useful sometimes...i think that it is used to group records with the same user id field, but i've never took a deep look at this codeunit...
and what about your problem?did you solve it?0 -
did you try my previous suggestion?
the error tells you that USERID does not exists, but the check is done with a value of a field in a table, not on the USERID...you should try to change the error text as i told you and check if the user does exist0 -
Belias wrote:did you try my previous suggestion?
the error tells you that USERID does not exists, but the check is done with a value of a field in a table, not on the USERID...you should try to change the error text as i told you and check if the user does exist0 -
Did you place the checkmark in Unlimited approval field for the approver?0
-
chengalasettyvsrao wrote:Did you place the checkmark in Unlimited approval field for the approver?
Thanks0 -
It worked because the User ID is in your table, but no entry for the user with Approver ID (or Approver ID of Approver ID ...). The system searches along the chain of User ID .Approver ID=User ID ... until it finds a user that has an Approval Limit >= the amount to be approved.
If a user has the the checkmark in Unlimited approval, the search terminates (the Amount Approval Limit field is ignored in this case).
Since, without setting the checkmark, you still got the error some user does not exist, and from what you write you think the user is there, you probaby did not make the correction Belias proposed:Belias wrote:the easiest solution to check the value is to change thisERROR(Text005,USERID);
toERROR(Text005,UserSetup."Approver ID");
You should set up approvals in such a way that (only) the last approver in the chain has unlimited Amount approval limit. All the others (starting with the user itself) should (sensibly) be configured with a strictly accending approval amount.0 -
Thank you vaprog.
the best solution is your answer below:
You should set up approvals in such a way that (only) the last approver in the chain has unlimited Amount approval limit. All the others (starting with the user itself) should (sensibly) be configured with a strictly accending approval amount.
Best regards.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