Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Web Services InventoryAdjustment Auto Assign Document Number

Posted on by 10

Hello All,

I am developing an application to drive in inventory adjustments using WS.  For some reason, I cannot auto-assign the next ADJ doc number from GP.  On the other hand, I am able to pass in the document number and the transaction is created. 

Please see the code below, any help is greatly appreciated!

//string docnmbr;

//docnmbr = "Static Doc Number";

inventoryKey = new InventoryKey();

//inventoryKey.Id = InventoryAdjustment.Key.Id;

// Create a batch key object to specify a batch for the inventory variance

batchKey = new BatchKey();

batchKey.Id = batch;

// Create an inventory variance object

InventoryAdjustment = new InventoryAdjustment();

// Populate the inventory variance object's required properties

//InventoryAdjustment.Key = inventoryKey;

InventoryAdjustment.BatchKey = batchKey;

InventoryAdjustment.Date = Convert.ToDateTime(dt);

InventoryAdjustment.CreatedDate = Convert.ToDateTime(dt);

 

 

*This post is locked for comments

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