Restricting 'Entry Type' selection on item journal

Smashed_Pumpkin
Member Posts: 47
On the item journal you have the 'Entry Type' option of 'Purchase', 'Sale', 'Positive adjustment' and 'Negative adjustment'. As we only want our users to use the 'positive/negative adjustment' options, could the system be set up to give an error message if the user selects one of the other options?
Many thanks.
Many thanks.
0
Comments
-
you could modify the option string of the control so that you have only two option.
This already appen becase the option of entry type are more then 4 you can have Transfer,Consumption,Output also.0 -
If you use a sql server , you can resolve this problem with the security filter.
If not write code in the trigger validate of the field0 -
I don't want to remove the options, so code is the way to go. Could you tell me what code I need to add? I'm still very new to this.
Thanks.0 -
To way
In a form, create a new form (copy of the standard form). In the trigger "On validate" insert this code
IF ("Entry Type"<>"Entry Type"::"Positive Adjmt.") AND ("Entry Type"<>"Entry Type"::"Negative Adjmt.")
THEN error(.......);0 -
Cheers, I'll give it a go0
-
Seeing as though your new to coding and what your trying to do is in the Inventory Journal, I wouldn't recommend making a new form. Stick with the original form and add something like this to the "on Validate" trigger of the "Entry Type" field of the table
1) Using a case statement:
Case "Entry Type" of
"Entry Type"::Purchase,"Entry Type"::Sale:
begin
Error('Your error message goes here');
end;
end;
2)using if statement:
If ("Entry Type"="Entry Type"::Purchase) or
("Entry Type"="Entry Type"::sale) then begin
Error('Your error message goes here');
end;
'Positive adjustment's and 'Negative adjustment's will continue to work as normal as you have not told the system to do anything different with them.
Remember : Keep it simpleRemember: Keep it simple0 -
Cheers for the advice. In the end I modified the original form (after taking a backup!) by inserting code into the OnValidate trigger, so now if users select anything other than positive/negative adjustment the system tells them "That option is not available".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