Saturday, November 3, 2018

Add an Inventory Transfer record via Web Services using C#

This code snippet shows how you can create an Inventory Transfer record via Web Services using C#. Take note that this is only exposed starting from the v2011.2 WSDL.

InventoryTransfer invTransfer = new InventoryTransfer();

RecordRef fromLoc = new RecordRef();
fromLoc.type = RecordType.location;
fromLoc.typeSpecified = true;
fromLoc.internalId = "1";

RecordRef toLoc = new RecordRef();
toLoc.type = RecordType.location;
toLoc.typeSpecified = true;
toLoc.internalId = "2";

InventoryTransferInventory[] invTransferItemArray = new InventoryTransferInventory[1];

RecordRef item = new RecordRef();
item.type = RecordType.inventoryItem;
item.typeSpecified = true;
item.internalId = "29";

invTransferItemArray[0] = new InventoryTransferInventory();
invTransferItemArray[0].item = item;
invTransferItemArray[0].adjustQtyBy = System.Double.Parse("1");
invTransferItemArray[0].adjustQtyBySpecified = true;

InventoryTransferInventoryList invList = new InventoryTransferInventoryList();
invList.inventory = invTransferItemArray;

invTransfer.location = fromLoc;
invTransfer.transferLocation = toLoc;
invTransfer.inventoryList = invList;

WriteResponse writeRes = _service.add(invTransfer);

11 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. I like this weblog very much, Its a rattling nice billet to read and find info . see this page

    ReplyDelete
  3. Thanks, foг ones marvelous posting! I genuinely enjoyed reading it, you miggһt Ƅe a great author. I wiⅼl made certain to booҝmark your blog and ѡill often come back sometime soon. I want to encoᥙrage yourself to continue your great job, have a nice evening!
    Web Development Course
    best web development courses
    web development classes
    web development course near me
    Web Development Training
    training on web development
    web development training program
    web development training course
    web development summer training

    ReplyDelete
  4. Thanks, foг ones marvelous posting! I genuinely enjoyed reading it, you miggһt Ƅe a great author. I wiⅼl made certain to booҝmark your blog and ѡill often come back sometime soon. I want to encoᥙrage yourself to continue your great job, have a nice evening!
    Web Development Course
    best web development courses
    web development classes
    web development course near me
    Web Development Training
    training on web development
    web development training program
    web development training course
    web development summer training

    ReplyDelete
  5. Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. web design in Switzerland

    ReplyDelete
  6. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. Digital Marketing

    ReplyDelete
  7. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Plombier Paris 24h/24

    ReplyDelete
  8. I am happy to find this post Very useful for me, as it contains lot of information. I Always prefer to read The Quality and glad I found this thing in you post. Thanks Harrisburg SEO

    ReplyDelete
  9. We have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends. sviluppo siti web Milano

    ReplyDelete
  10. Profit primarily prime quality items -- you can understand them all within: New web series

    ReplyDelete