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
For the Item web service you mention, are you using the Item List page or the Item Card page? Is the field available on that page?
Thank you Stefano for your response
I have tried both Item Card page and Item List page, the field is also available on the page.
Are you using SOAP web services? If the field is added to a page exposed as web service, you absolutely can see it. Have you refreshed your web service reference? Can you check the WSDL?
yes i am using SOAP web service, the field is added to the page exposed in the web service
Please check the WSDL and maybe post it here.
If you're using Read, it wants a primary key (so Item No).
To retrieve Items via your Product ID field (custom) you need to filter the Items for that field and then retrieve who matches the filters. Something like described here for Customers:
Thank you very much Stefano, i was able to get the item using the "productid" field
Below code did the magic:
static async Task Main(string args)
var cred = clientCred();
var itemFilterList = new List<it.AstItem_Filter>();
var itemFilter = new it.AstItem_Filter()
Field = it.AstItem_Fields.Product_Id,
//The productid value is passed into the criteria to get the nav item
Criteria = "eca123e6-23dc-4649-94bf-b26c4dda22cb"
var asrr = itemFilterList.ToArray();
var astItm = await cred.ReadMultipleAsync(new it.ReadMultiple(asrr, null, 0));
var navItem = astItm.ReadMultiple_Result1;
for (int i = 0; i < navItem.Length; i++)
string itemDes = navItem[i].Description;
itemNo = navItem[i].No;
string itemPID = navItem[i].Product_Id;
var so = createSOrder();
catch (Exception ex)
var msg = ex.StackTrace;
Business Applications communities