RTC gives an error when trying to assign a value by validate
                
                    willy                
                
                    Member Posts: 67                
            
                        
            
                    Hi! I am generating some new job planning lines in nav 2009r2.
When I try to validate the data in the "User Id" field in table 1003 "Job Planning Line" using Validate("User Id",USERID) it gives an error in RTC that the user do not exist.
From the classic client it works without errors.
It is no big deal because I cant assing the value without validating it, but I was just currious why it throws an error?
                When I try to validate the data in the "User Id" field in table 1003 "Job Planning Line" using Validate("User Id",USERID) it gives an error in RTC that the user do not exist.
From the classic client it works without errors.
It is no big deal because I cant assing the value without validating it, but I was just currious why it throws an error?
0                
            Comments
- 
            Print the USERID field and check the value..
If I Remember Correctly RTC prints domain\userid0 - 
            mohana_cse06 wrote:Print the USERID field and check the value..
If I Remember Correctly RTC prints domain\userid
Hi!
Printing the value gives med only the user name, don't domain + user
It seems like it tries to look into table 2000000002 User.
The strange thing is that if I change my code from:
//old code line
NewJobPlanLine.VALIDATE("User ID", USERID);
to:
//new code line
IF UserSetupRec.GET(USERID) THEN //UserSetupRec is table 91 User Setup
NewJobPlanLine.VALIDATE("User ID", UserSetupRec."User ID");
it works without any problems0 - 
            willy wrote:The strange thing is that if I change my code from:
//old code line
NewJobPlanLine.VALIDATE("User ID", USERID);
to:
//new code line
IF UserSetupRec.GET(USERID) THEN //UserSetupRec is table 91 User Setup
NewJobPlanLine.VALIDATE("User ID", UserSetupRec."User ID");
it works without any problems
Well the good thing then is that you have shared the solution, so if someone else gets the same issue they know how to solve it.
=D> =D> =D> =D>David Singleton0 
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
 - 323 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
 

