Modify Response for oData page webservice

jimmyf
Member Posts: 104
In BC version 16 I have published an API page as a webservice and after inserting data successfully I would like to include specific data in the response that can be used by the application calling the webservice.
Is this possible and if so how do I do this?
Thank You
Is this possible and if so how do I do this?
Thank You
0
Answers
-
You can add a field to the API page and fill you specific data in that field, then the webservice client can read what you have added to the field?For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0
-
Thanks for your reply.
From an external application we are inserting data into the table behind the api page.
Are you suggesting that I create another field in the table that contains the data I want to send back in the response and populate that field onafterinsert of the data?
Will that field and value exist in the response?0 -
I would not add the data to the table behinde the API page, but I would only create a variable on the page and insert data into that field, OnNewRec trigger exFor help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0
-
Ok. And will this variable be visible in the json response?0
-
yes.For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.0
-
Hi Sorry for taking so long to respond, but unfortunately this did not work.
I created a global variable on the API page called responseMessage, and populated it as you suggested and on a successful Post the response did not include this variable.
Do I need to declare the variable in a particular way?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