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)

Report
All responses (
Answers (