Skip to main content

MGCLatticePriceInquiryService

Read-only Lattice service that resolves the EFFECTIVE sales price for a customer + item + date + quantity by wrapping the classic PriceDisc pricing engine. It searches the sales trade agreements for the customer's price group and falls back to the item base price, returning the applied unit price, price unit, and the source trade-agreement RecId.

Methods​

construct​

Creates a new MGCLatticePriceInquiryService instance.

  • Visibility: public
  • Returns: MGCLatticePriceInquiryService A new service instance.

No parameters.

collectInfologErrors​

Appends the error-severity infolog lines written after _fromLine to a list, so a failed pricing call returns the reason D365 gave instead of only a generic message. Warnings and informational lines (including the server-side CLR detail) are not copied.

  • Visibility: public
  • Returns: void
NameTypeOptionalDescription
_errorsListNoThe list to append to.
_fromLineintNoThe infolog line count when the operation started.

resolveSalesPrice​

Resolves the effective sales price for the requested customer + item + date + quantity, in the requested (or defaulted) currency, unit and legal entity. Never throws: any fault is captured on the response with its ErrorCode and Errors. The request's CorrelationId is echoed.

  • Visibility: public
  • Returns: MGCLatticePriceInquiryResponseContract The populated MGCLatticePriceInquiryResponseContract.
NameTypeOptionalDescription
_requestMGCLatticePriceInquiryRequestContractNoThe price-inquiry request.