is it passible to validate field value through Navision web service before insert or update

vinceliu666
Member Posts: 51
Hi All:
Navision provide web service that you could call it for insert , update ... etc. The filed value will be validated when you call web service Create / Update function. But I just want to validate field value before call Create / Update function for checking filed value legally .
Is it passible to validate field value through Navision web service before insert or update? Does anyone has ideal to do it ?
Navision provide web service that you could call it for insert , update ... etc. The filed value will be validated when you call web service Create / Update function. But I just want to validate field value before call Create / Update function for checking filed value legally .
Is it passible to validate field value through Navision web service before insert or update? Does anyone has ideal to do it ?
0
Best Answers
-
Just copy the validation from where it currently exist, create something similar in the web service and utilize it before the create/update function in the web service. This, of course, means it will be inefficient since it's having to do the same thing twice but it does what you're asking. You can get around the inefficiency but you have to ask yourself how often it happens and whether it's worth it with a little more programming.5
-
Just copy the validation from where it currently exist, create something similar in the web service and utilize it before the create/update function in the web service. This, of course, means it will be inefficient since it's having to do the same thing twice but it does what you're asking. You can get around the inefficiency but you have to ask yourself how often it happens and whether it's worth it with a little more programming.
Thanks for your feedback , My Issue is that if I run record.insert, the record will be inserted. But I just want to validate data only, not insert record. If I run the record.insert , I must delete the record after insert . But the autoasign no for example Sales Order No will be add one.
0 -
vinceliu666 wrote: »Just copy the validation from where it currently exist, create something similar in the web service and utilize it before the create/update function in the web service. This, of course, means it will be inefficient since it's having to do the same thing twice but it does what you're asking. You can get around the inefficiency but you have to ask yourself how often it happens and whether it's worth it with a little more programming.
Thanks for your feedback , My Issue is that if I run record.insert, the record will be inserted. But I just want to validate data only, not insert record. If I run the record.insert , I must delete the record after insert . But the autoasign no for example Sales Order No will be add one.
Another option is to make a Record Variable: Temporary. By using Temp Tables you can do all CRUD operations without committing anything to your Physical table.1
Answers
-
you can validate the field in the OnInsert trigger0
-
Just copy the validation from where it currently exist, create something similar in the web service and utilize it before the create/update function in the web service. This, of course, means it will be inefficient since it's having to do the same thing twice but it does what you're asking. You can get around the inefficiency but you have to ask yourself how often it happens and whether it's worth it with a little more programming.5
-
If you want to validate the field on certain criteria, value or pattern just write a function and publish it as a Soap Service for example and test the value with your own logic. After validation perform a Rec.Insert(TRUE) or Rec.Modify(TRUE) for example.0
-
Just copy the validation from where it currently exist, create something similar in the web service and utilize it before the create/update function in the web service. This, of course, means it will be inefficient since it's having to do the same thing twice but it does what you're asking. You can get around the inefficiency but you have to ask yourself how often it happens and whether it's worth it with a little more programming.
Thanks for your feedback , My Issue is that if I run record.insert, the record will be inserted. But I just want to validate data only, not insert record. If I run the record.insert , I must delete the record after insert . But the autoasign no for example Sales Order No will be add one.
0 -
There is no simulate OnInsert, OnModify, OnValidate triggers without actually calling them first.
The only way around that would be to implement your own AL function that does the wished validation for you - without actually inserting - which honestly sounds like a nightmare to code and maintain for complex scenarios.Austrian NAV/BC Dev0 -
vinceliu666 wrote: »Just copy the validation from where it currently exist, create something similar in the web service and utilize it before the create/update function in the web service. This, of course, means it will be inefficient since it's having to do the same thing twice but it does what you're asking. You can get around the inefficiency but you have to ask yourself how often it happens and whether it's worth it with a little more programming.
Thanks for your feedback , My Issue is that if I run record.insert, the record will be inserted. But I just want to validate data only, not insert record. If I run the record.insert , I must delete the record after insert . But the autoasign no for example Sales Order No will be add one.
Another option is to make a Record Variable: Temporary. By using Temp Tables you can do all CRUD operations without committing anything to your Physical table.1 -
irasoelbaks:
It seems work. I thought your suggestion is the best solution. I could validate field value and not really insert or update the record in physical table. thanks for your answer.1
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