Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Method GetReceivablesInvoiceByKey doesn't return information about Invoice items.

(0) ShareShare
ReportReport
Posted on by 63

Hello Team,

Could you clarify, why the method GetReceivablesInvoiceByKey doesn't return information about Invoice items?

For example, method GetSalesInvoiceByKey returns Invoice items data, but I cannot receive all invoices using method GetSalesInvoiceByKey, and for some invoices, I use method GetReceivablesInvoiceByKey, and cannot receive Invoice items.

Categories:
  • Suggested answer
    RE: Method GetReceivablesInvoiceByKey doesn't return information about Invoice items.

    [View:/cfs-file/__key/communityserver-discussions-components-files/32/DynamicsGPWebServiceRef.chm:320:240]

    I would recommend going through the Dynamics GP Web Services SDK help file I'm (hopefully) attaching here.

    This is all the information we have on the various methods available to Web Services and what they return.

    For example, the GetReceivablesInvoiceByKey method shows it returns a return value of a 'GetReceivablesInvoiceByKeyResult' which is of 'ReceivablesInvoice' type. Drilling down on that, it is a receivables invoice document in Dynamics GP with properties of CommissionBasedOn, CommissionAmount and Commissions.

    When I run the sample code for the method in a tester I have, it just returns an invoice amount for the 'STDINV2185' invoice key, from the sample company, that the code is specified to pull from.

    The help file also shows information such as the 'ReceivablesInvoice' return type inhertis from ReceivablesDebitDocument, which inherits from ReceivablesDocument, so it has that information as well.

    Unfortunately, we don't have any document or list that tells us that this specific Web Services method returns this value. With these type of questions asking how to receive invoice items through a Web Services method, we would be going to this Web Services SDK help file and looking at the method references for the objects that closest resemble what you're asking and then looking at them specifically to see if they do, in fact, return what we need or not.

    This is what I'd recommend looking at. Hopefully it'll send through the forums.

    If not, I believe you can download them from here as well >> Download Microsoft Dynamics GP 2013 Web Services from Official Microsoft Download Center

    It mentions GP 2013, but the information on the WS methods would still be relevant for current versions of Dynamics GP as well.

    Thanks

  • Andrew1986 Profile Picture
    Andrew1986 63 on at
    RE: Method GetReceivablesInvoiceByKey doesn't return information about Invoice items.

    Derek Albaugh

    Derek, could you clarify how to receive invoice items?

  • Andrew1986 Profile Picture
    Andrew1986 63 on at
    RE: Method GetReceivablesInvoiceByKey doesn't return information about Invoice items.

    I didn't find another method.

  • Andrew1986 Profile Picture
    Andrew1986 63 on at
    RE: Method GetReceivablesInvoiceByKey doesn't return information about Invoice items.

    Derek Albaugh

    Yes, I tried to use this method GetReceivablesInvoiceList.

    But, the method returns only general information.

    Example:

    <GetReceivablesInvoiceListResult>

                   <ReceivablesInvoiceSummary>

                       <Key>

                           <CompanyKey>

                               <Id xmlns="schemas.microsoft.com/.../Id>

                           </CompanyKey>

                           <Id>SALES00000001001</Id>

                       </Key>

                       <CustomerKey>

                           <CompanyKey>

                               <Id xmlns="schemas.microsoft.com/.../Id>

                           </CompanyKey>

                           <Id>AARONFIT0001</Id>

                       </CustomerKey>

                       <CustomerPONumber/>

                       <CustomerName>Aaron Fitz Electrical</CustomerName>

                       <Date>2027-05-09T00:00:00</Date>

                       <CurrencyKey>

                           <ISOCode>USD</ISOCode>

                       </CurrencyKey>

                       <BatchKey>

                           <CompanyKey>

                               <Id xmlns="schemas.microsoft.com/.../Id>

                           </CompanyKey>

                           <Source>RM_Sales</Source>

                           <Id>RM BATCH</Id>

                           <CreatedDateTime>2027-05-09T00:00:00</CreatedDateTime>

                       </BatchKey>

                       <SalespersonKey>

                           <CompanyKey>

                               <Id xmlns="schemas.microsoft.com/.../Id>

                           </CompanyKey>

                           <Id>PAUL W.</Id>

                       </SalespersonKey>

                       <TradeDiscountAmount>

                           <Currency>USD</Currency>

                           <Value>0.00000</Value>

                           <DecimalDigits>2</DecimalDigits>

                       </TradeDiscountAmount>

                       <FreightAmount>

                           <Currency>USD</Currency>

                           <Value>0.00000</Value>

                           <DecimalDigits>2</DecimalDigits>

                       </FreightAmount>

                       <MiscellaneousAmount>

                           <Currency>USD</Currency>

                           <Value>0.00000</Value>

                           <DecimalDigits>2</DecimalDigits>

                       </MiscellaneousAmount>

                       <TaxAmount>

                           <Currency>USD</Currency>

                           <Value>3.50000</Value>

                           <DecimalDigits>2</DecimalDigits>

                       </TaxAmount>

                       <DocumentAmount>

                           <Currency>USD</Currency>

                           <Value>53.50000</Value>

                           <DecimalDigits>2</DecimalDigits>

                       </DocumentAmount>

                       <ModifiedDate>2027-05-11T15:39:29.223</ModifiedDate>

                       <TransactionState>Work</TransactionState>

                   </ReceivablesInvoiceSummary>

  • Suggested answer
    RE: Method GetReceivablesInvoiceByKey doesn't return information about Invoice items.

    Testing this GetReceivablesInvoiceByKey method, the sample code just returns the invoice amount for the invoice ID mentioned in the code 'STDINV2185'.

    Looking at the list of methods that mention GetReceivablesInvoice..... have you tried the GetReceivablesInvoiceList method?  This states that it retrieves a list of receivables invoice summary objects that match the specified criteria, so may be more of what you're looking for.

    Thanks

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans