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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP Web Services SOP UnitPrice and Total amount blank when create SalesInvoiceLine

(0) ShareShare
ReportReport
Posted on by

Hi there,

We built a customization to create sales order invoices from a 3rd party system and it creates the header and lines in GP. Previously I believe we had the DynamicsSecurityConsole, Sales Document default policy for set to Calculate Total Amount Behavior = Do not calculate and Calculate Unit Price Behavior = Do not calculate

I've actually tried creating an invoice with it set to both Calculate and Do Not Calculate and the results are the same, not $$ put in.

3 months ago when we built this code it was working and the unit price and extended price were in fact coming in on the invoice. It was working properly. The code was waiting for other aspects of the project to be completed before the users would run it so it sat for a few months. When we tried running the code a week ago the web services were not working properly. I traced the issue to a corrupted filein the SecurityConsole. I ran the Web Services for Microsoft Dynamics GP Configuration Wizard and did a repair.

Now it the code has stopped working and the $$ are not being populated.

Here is the code we are using to populate the line information... Can anyone see anything wrong or missing that the SOP line requires to be valid?

List<TWOGP.SalesInvoiceLine> lineItems = new List<TWOGP.SalesInvoiceLine>();

foreach (var _item in invoiceToPush.ClientInvoiceLineItems)
{
if (_item.Hours > 0 && _item.Amount > 0)
{
TWOGP.ItemKey invoiceItem = new TWOGP.ItemKey();
invoiceItem.Id = GetGPItemKey(_item, skillCode_GPCategory);

TWOGP.SalesInvoiceLine lineItem = new TWOGP.SalesInvoiceLine();
lineItem.Quantity = new TWOGP.Quantity() { Value = _item.Hours.GetValueOrDefault(0), DecimalDigits = 2 };
lineItem.UnitPrice = new TWOGP.MoneyAmount() { Value = _item.Amount.GetValueOrDefault(0), DecimalDigits = 2 };
lineItem.TotalAmount = new TWOGP.MoneyAmount() { Value = _item.Amount.GetValueOrDefault(0) * _item.Hours.GetValueOrDefault(0), DecimalDigits = 2 };
lineItem.ItemKey = invoiceItem;
lineItem.IsNonInventory = false;
lineItem.UofM = "HOUR";

lineItems.Add(lineItem);
}
}


There are no exceptions being raised in the ExceptionsConsole.

I will be re-installing the web services today to maybe see if it needs a re-install instead of just a repair.

Thanks!

*This post is locked for comments

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

    This was a configuration issue and not an issue with the web services setup

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans