web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    on at

    Any news on this? 

  • Suggested answer
    Bilal Haider Profile Picture
    412 on at

    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.

  • Suggested answer
    Estuardo Leon Profile Picture
    5 on at

    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)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans