Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Web Services InventoryAdjustment Auto Assign Document Number

(0) ShareShare
ReportReport
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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans