Hi,
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:
<ItemCrossReferences> <Key>...</Key> <Cross_Reference_No>XXXXXX</Cross_Reference_No> <Item_No>8011</Item_No> <Unit_of_Measure>EACH</Unit_of_Measure> <Discontinue_Bar_Code>false</Discontinue_Bar_Code> </ItemCrossReferences>
This works great.
Now the failing part
- Create an entry in the Page 5721 "Item Cross Reference Entries".
<ItemCrossReference> <Key>...</Key> <Cross_Reference_Type>Bar_Code</Cross_Reference_Type> <Cross_Reference_No>XXXXXX</Cross_Reference_No> <Unit_of_Measure>EACH</Unit_of_Measure> <Discontinue_Bar_Code>false</Discontinue_Bar_Code> </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 class
Thanks,
Ignacio
*This post is locked for comments
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.
Hi,
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?
Thanks,
Ignacio
Thanks for your help,
Note for future searches:
This is how you design a page in NAV
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.
Hi Andrew,
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")
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:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156