Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
I want to create a Bar_Code Item Cross Reference but I got an error that I'm not been able to solve.
This is how I do it.
- Create an entry en Page 5723 "Item Cross References" like:
This works great.
Now the failing part
- Create an entry in the Page 5721 "Item Cross Reference Entries".
</ItemCrossReference>And then I get this error:System.Web.Services.Protocols.SoapException: 'The Item does not exist. Identification fields and values: No.='''Any idea of what might be the problem?I do not see any No. property in the ItemCrossReference classThanks,Ignacio
Hi! You have to pass Item No. for which you create item cross-reference. On Insert trigger has Item.GET() function which throws you an exception:
Thanks for your answer, unfortunately I cannot see the Item_No field in the schema provided by the web service. This is the description of the ItemCrossReference returned by that page (5721 "Item Cross Reference Entries")
You need to add Item No field on page 5721 at NAV to see it in Web Service.
But pages 5721 and 5723 are both based on the same table - Item Cross Reference. Why do you need them both as web services? You can use just 5723 and everything will be ok.
Thanks for your help,
Note for future searches:
This is how you design a page in NAV
I have now another issue, as I said I'm creating both a record in both 5721 & 5723 pages. I can create the record in 5723 but when I try it in 5721 I'm getting this error:
The Item Cross Reference already exists. Identification fields and values: Item No.='1006',Variant Code='',Unit of Measure='EACH',Cross-Reference Type=' ',Cross-Reference Type No.='',Cross-Reference No.='XXXXXX1111''
You pointed that both 5721 & 5723 use the same underlying table.
Do I need to create both entries?
I know I'm missing something, because after I create the record in 5723 I can see it when querying the web service, but I do not see the entry in 5721
What I'm missing?
Think about 5721 and 5723 as a 2 interfaces for the same table. Then you create record in 5723 it appears in Item Cross Reference table and you can't create it with 5721 because it already exists (same key). You just need to create it with one of them. not in both.
But it's very strange that you can't see it in 5721. It definitely exists there.