Transfer order receive codeunit

asin
Member Posts: 25
I want to run a function when transfer order receive Boolean OK is clicked.
whenever the user click ok of receive Boolean ,then the function will check the condition if the condition it meets for that user by running the function defined,if is ok then receive will work else it will show an error message.
Please help me where i have to write and call the function on transfer order codeunit

here is my function calling
IF NOT CheckLocationUser(user,"Transfer-to Code") THEN
ERROR('You are not allowed to Recieve beyond Your Location');
whenever the user click ok of receive Boolean ,then the function will check the condition if the condition it meets for that user by running the function defined,if is ok then receive will work else it will show an error message.
Please help me where i have to write and call the function on transfer order codeunit

here is my function calling
IF NOT CheckLocationUser(user,"Transfer-to Code") THEN
ERROR('You are not allowed to Recieve beyond Your Location');
0
Comments
-
5705 TransferOrder-Post Receipt (OnRun)0
-
@da_neal I have written the the code on 5705 under "Onrun.But it is not working....
in both cases it is showing the message.,ie, if user and transfer to location matches and if does not match...for both it is showing the defined error message.
I have allocated transfer to location for each user in "mylocations" table.
Now at time of recive if current logged in user trying too recieve the order beyond his allocated location, then the error message will spark.But in my casemessage is showing whether use and transfer to location matches or not with mylocation table...
this is where i defined the locations against the user
Code and function "on run" of 5705 codeunit
additional info....
plz help
0 -
hm... Where in your function filter to User?
0 -
@da_neal yaa....u r right...
I have written the same function for "transfer from code" in transfer header....
as below
Transfer-from Code - OnValidate()
user := USERID;
//MESSAGE(Text008, USERID);
IF NOT CheckLocationUser(user,"Transfer-from Code") THEN
ERROR('You are not allowed to Ship/Recieve beyond Your Location');
will the same work here in 5705?0 -
advice one: name parameter not same as field, in your function best to name TransferToCode, not
"Transfer-to Code".
advice two: check which variable you use. TransferHeader is a global variable not initialized yet in your sequence code.
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