Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

The Standard Text does not exist. Identification fields and values: Code='..'

Posted on by Microsoft Employee

Below is the code that is causing this error.

The Standard Text does not exist. Identification fields and values: Code='....'

oNavPurchaseOrder.oNavPurchase_Service ord = new oNavPurchaseOrder.oNavPurchase_Service();

ord.Url = "integrations/.../oNavPurchase";
oNavPurchaseOrder.oNavPurchase or = new oNavPurchaseOrder.oNavPurchase();
ord.UseDefaultCredentials = true;
or.Vendor_Order_No = "100001";
or.Buy_from_Vendor_No = "10000";
or.Document_Date = DateTime.Parse(DateTime.Now.ToShortDateString());// DateTime.Parse(ceI.document_date);
try
{
ord.Create(ref or);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message + ex.Source + ex.StackTrace);
}
int des = 5;
or.PurchLines = new oNavPurchaseOrder.Purchase_Order_Line[des];
for (int idx = 0; idx < des; idx++)
or.PurchLines[idx] = new oNavPurchaseOrder.Purchase_Order_Line();
ord.Update(ref or);
int h = 1;
var hh = or.PurchLines[h];
hh.TypeSpecified = true;
hh.QuantitySpecified = true;
hh.Direct_Unit_CostSpecified = true; 
hh.Type = oNavPurchaseOrder.Type.Item;
hh.No = "LS-MAN-10";
hh.Quantity = 2;
hh.Direct_Unit_Cost = 10;
hh.Total_Amount_Excl_VATSpecified = false;
hh.Total_Amount_Incl_VATSpecified = false;
hh.Total_VAT_AmountSpecified = false;
ord.Update(ref or);

*This post is locked for comments

  • Suggested answer
    Estuardo Leon Profile Picture
    Estuardo Leon 5 on at
    RE: The Standard Text does not exist. Identification fields and values: Code='..'

    Hi, the solution that I found for this error is solved with this link, the part that says "Making the above code run in NAV 2009RTM".  The methods "GetCopy and PrepareForUpdate", are there too.

    Link:  docs.microsoft.com/.../handling-sales-orders-from-page-based-web-services-in-nav-2009sp1-and-rtm

    B
    est regards.
    Estuardo León.

    Microsoft Dynamics NAV 2018 (Customer)

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: The Standard Text does not exist. Identification fields and values: Code='..'

    Hi,

    Seems like you are trying to insert a Purchase Line with Type '' and No ''. When Type is '' then it links to Standard Text.

    You code has some issues. You are assigning all the values to variable hh but then you are updating the service reference with variable or. Try to get variable or updated from variable hh before calling Update. Also please name variables in a way so that it will not be confusing for you and others.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The Standard Text does not exist. Identification fields and values: Code='..'

    Any news on this? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans