Hi everybody,
I added a custom field on the item card ‘product id’ which is the product id in dynamics crm, i also made this field a key on the item table.
I created an Item web service but i cannot query/get an item using the ‘product id’ field
Below are screenshot of steps carried out and response i got:
When i query using the ‘Item no’ field, the response return an item:
When i query using the ‘product id’ field, the response is ‘Parameter No in method Read in service AstItem_Service is null!’
My aim is to have an azure function that will get the product id from crm and query the item card field ‘product id’ to get the item
PalleA
February 21, 2019, 12:33pm
2
Can do do the same on any other field? for example Description?
The eror message is that you read-value is NULL and not product id
PalleA
February 21, 2019, 12:36pm
3
I have not worked with Wizdler so I am not sure how you post works (I am using WebServiceStudio)
Hello Palle,
Thank you for you response, i have tried using another field ‘Description’
Below is the response i got:
When i pass the value of ‘description’ field in my earlier post
Rsponse:
How can i change my read-value to product id?
What value does this service expect to receive? If it is working for No. only, it is mean you need to re-write this service
PalleA
February 21, 2019, 2:13pm
6
I am not sure if I understood you - Did you mange to read/get a record with a filter on description work?
No, i did not get a record when i filter using the ‘description’ field, it error-ed out with ‘Parameter No in method Read in service AstItem_Service is null!’
I believe the read-value is null because the service is expecting a value from the field ‘no’
Thank you for your response RedFoxUA
The service was generated by NAV using the web service
can i update the service’s read-value to expect a parameter value from the field ‘product id’?
I could not get the WebServiceStudio to test
OK and based on you installation you can see the source parameter, right?
I really do not understand the ‘source parameter’ thing, but at the point of generating the web service the parameters i specified were the ‘object type’, ‘object id’ and ‘Service Name’
page 30 expects Item No. like a parameter
PalleA
February 22, 2019, 7:20am
13
Exactly - The way the request is done means that it can only do it based upon the primary key.
Thank you RedFoxUA
That means page 30 and 31 expects item no as a parameter
Is it possible to create another page that expects product id as parameter?
PalleA
February 22, 2019, 10:45am
15
You have to create a Query not a page.
To see how you can do it - take a look at Query 410, 7150 or 9150 (Hint: Type = Filter).
Thank you palle
I will look at these queries and revert
I am working with soap services, and i know i cannot expose a query using soap
what is your advice?