Running business logic from web service
generic
Member Posts: 511
Hello
I am writing a test webservice to modify the customer record name, and it's not modifying the ""Search Name". Is there something I'm missing? Here is my code. What do I need to do to run business Logic?
thanks
I am writing a test webservice to modify the customer record name, and it's not modifying the ""Search Name". Is there something I'm missing? Here is my code. What do I need to do to run business Logic?
CustomerWS.Customer_Service service = new WebServiceApp.CustomerWS.Customer_Service();
CustWS.UseDefaultCredentials = true;
CustomerWS.Customer Cust = new WebServiceApp.CustomerWSr.Customer();
Cust = service.Read("10000");
Console.WriteLine(Cust.Name);
Console.WriteLine(Cust.Search_Name);
MyCust.Name = "test2";
Console.WriteLine(Cust.Name);
Console.WriteLine(Cust.Search_Name);
service.Update(ref Cust);
thanks
0
Comments
-
You need to check it after the update, the record is transfered and the business logic is called by insert/update/delete, not just by assigning the value (I suppose)...0
-
That's correct. There is no business logic built into the service objects you have created in your code. The properties will be updated after making a call into the web service (i.e. update, read, etc.). In general, all business logic is executed on the NAV server when invoked from web services, or role-tailored client.Tom Cornelius
Test Lead
Microsoft Dynamics NAV
This posting is provided "AS IS" with no warranties, and confers no rights.0 -
ok so the business logic is executable on update, insert.
My question is still is why isn't the "Search Name" updated when I go to the Customer Card?0 -
You never told us that the Search name is not updated when you look at the modified card through RTC or CC. I though that you mean it is not updated when you execute your code, because you are displaying the search name before the business logic is executed...0
-
Updating the Search Name on the customer table involves the use of xRec to compare the previous value of the Name field to the Search Name field. An earlier version of NAV 2009 (CTP3 or CTP4) had a bug with web services where xRec was not being set properly. This was supposed to be fixed in the final release of NAV 2009, but I have not had a chance to test it. It could be that this error still exists.0
-
The bug is still exists. If Search Name is blank it populates it. If Search name is same as Name it doesn't overwrite.
Also does it know the sequence of validation of fields if validation happens on update,insert?0 -
I think that the sequence is in ID field sequence...0
-
Are they going to fix this :bug: in SP1 for 2009?0
-
It's being looked at, but I can't tell you whether or not it will be fixed.Tom Cornelius
Test Lead
Microsoft Dynamics NAV
This posting is provided "AS IS" with no warranties, and confers no rights.0 -
Tom Cornelius wrote:It's being looked at, but I can't tell you whether or not it will be fixed.
Thank you? :?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
