Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Sales_order.key - "Key "" is not well formed!"

(0) ShareShare
ReportReport
Posted on by

Hi

Can anyone tell me how to create the key in the Sales)order.Create?

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    Guys thanks for the great help and quick response.

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    As I thought. Guys, thank you for everything and the quick response. Jonathan and Vishal, you were great help.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    This is basically the Table Index (Key). This normally helps, when you want to read the data with proper key defined.

    When you keep it blank, system will have use default key.

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    To Confirm

    When creating a new sales order, I do not need to specify the key or the url? The url I understand as it is already defined. But what is the purpose of the Key then? Just for Read? Or only for internal system use?

  • Verified answer
    keoma Profile Picture
    32,717 on at
    RE: Sales_order.key - "Key "" is not well formed!"

    remove the lines

    salesOrderService.Url = "..../Integration_Sales_Order";

    salesOrder.Key = "";      

    set a correct value for salesOrder.Sell_to_Customer_No.

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    using Integration_Sales_Order;

    ....

    Integration_Sales_Order.Integration_Sales_Order_Service salesOrderService = new Integration_Sales_Order.Integration_Sales_Order_Service();

                   Integration_Sales_Order.Integration_Sales_Order salesOrder = new Integration_Sales_Order.Integration_Sales_Order();

    salesOrderService.Url = "..../Integration_Sales_Order";

                   salesOrderService.UseDefaultCredentials = true;

                   salesOrderService.Create(ref salesOrder);

                   salesOrder.Sell_to_Customer_No = ....;                

                   salesOrder.Key = "";                

                   salesOrderService.Update(ref salesOrder);

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    I am busy creating a Sales_Order in NAV 2015. I use the web service (Integration_Sales_Order.Integration_Sales_Order_Service) using the Create Method. When I populate the Class I leave out the Integration_Sales_Order.Integration_Sales_Order.Key.

    This is now returning an error "Key "" is not well formed!". I need to find out what should go into the Key value before I Update the Sales_Order (salesOrderService.Update(ref salesOrder))

    Does this make sense? I am doing the Dynamics web service for the first time. I have added the web reference to my project C#.

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    Which key? What is the exact requirement?

  • Community Member Profile Picture
    on at
    RE: Sales_order.key - "Key "" is not well formed!"

    Sorry. Sales.Order and not Sales)order. Finger problems

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans