---
id: object/codeunit/5348
type: object
title: Codeunit 5348 "CRM Quote to Sales Quote"
summary: Codeunit 5348 "CRM Quote to Sales Quote" in Base Application (Microsoft.Integration.D365Sales). 5 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC24-25, BC29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 38021ba86811cf45c9251cf5fd9129e19add4586b507af58cc1309b459f852cb
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/D365Sales/CRMQuotetoSalesQuote.Codeunit.al
    title: src/Layers/W1/BaseApp/Integration/D365Sales/CRMQuotetoSalesQuote.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9637
object_type: codeunit
object_id: 5348
name: CRM Quote to Sales Quote
namespace: Microsoft.Integration.D365Sales
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 34
  events: 9
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 9
  called_by: 1
  implements: 0
---

# Codeunit 5348 "CRM Quote to Sales Quote"

> Codeunit 5348 "CRM Quote to Sales Quote" in Base Application (Microsoft.Integration.D365Sales). 5 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC24-25, BC29.

Base Application · Microsoft.Integration.D365Sales · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/D365Sales/CRMQuotetoSalesQuote.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | CRM Quote |

## Events published

- `OnAfterInitializeSalesQuoteLine(CRMQuotedetail: Record "CRM Quotedetail"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line")` (integration)
- `OnAfterCopyShipToInformationIfNotEmpty(CRMQuote: Record "CRM Quote"; var SalesHeader: Record "Sales Header")` (integration)
- `OnCreateOrUpdateNAVQuoteOnAfterCoupleRecordIdToCRMID(CRMQuote: Record "CRM Quote"; SalesHeader: Record "Sales Header")` (integration)
- `OnCreateOrUpdateSalesQuoteHeaderOnBeforeInsertOrModify(CRMQuote: Record "CRM Quote"; var SalesHeader: Record "Sales Header"; OpType: Option)` (integration)
- `OnHideQuoteDiscountsDialog(var Hide: Boolean)` (integration)
- `OnBeforeGetCRMAccountOfCRMQuote(CRMQuote: Record "CRM Quote"; var CRMAccount: Record "CRM Account"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnAfterArchSalesDocumentNoConfirm(var SalesHeader: Record "Sales Header")` (integration)
- `OnBeforeFindOrderSalesHeader(var OrderSalesHeader: Record "Sales Header"; CRMSalesorder: Record "CRM Salesorder")` (integration)
- `OnBeforeGetCoupledCustomer(CRMQuote: Record "CRM Quote"; var Customer: Record Customer; var Result: Boolean; var IsHandled: Boolean)` (integration)

## Procedures

- `ProcessInNAV(CRMQuote: Record "CRM Quote"; var SalesHeader: Record "Sales Header"): Boolean`
- `GetCoupledCustomer(CRMQuote: Record "CRM Quote"; var Customer: Record Customer): Boolean`
- `GetCRMAccountOfCRMQuote(CRMQuote: Record "CRM Quote"; var CRMAccount: Record "CRM Account"): Boolean`
- `CreateExtendedDescriptionQuoteLines(SalesHeader: Record "Sales Header"; FullDescription: Text; QuoteLineNo: Integer)`
- `ManageSalesQuoteArchive(var SalesHeader: Record "Sales Header")`

Plus 20 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 5351 "CRM Quote"](../table/5351.md)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 5344 "CRM Product Name"](../codeunit/5344.md) (9 calls: `ApplyQuoteDiscounts → CDSServiceName`, `CreateOrUpdateNAVQuote → CDSServiceName`, `GetCoupledCustomer → CDSServiceName`, …)
- [Codeunit 5063 "ArchiveManagement"](../codeunit/5063.md) (2 calls: `ManageSalesQuoteArchive → ArchSalesDocumentNoConfirm`, `ProcessWonQuote → ArchSalesDocumentNoConfirm`)
- [Codeunit 5336 "Integration Record Synch."](../codeunit/5336.md) (2 calls: `CreateOrUpdateSalesQuoteHeader → GetTextValue`, `CreateOrUpdateSalesQuoteHeader → SetTextValue`)
- [Codeunit 447 "Record Link Management"](../codeunit/447.md) (1 call: `CreateNote → WriteNote`)
- [Codeunit 5330 "CRM Integration Management"](../codeunit/5330.md) (1 call: `InitializeSalesQuoteLine → IsUnitGroupMappingEnabled`)
- [Codeunit 5342 "CRM Synch. Helper"](../codeunit/5342.md) (1 call: `CreateOrUpdateSalesQuoteHeader → GetNavCurrencyCode`)
- [Codeunit 5343 "CRM Sales Order to Sales Order"](../codeunit/5343.md) (1 call: `ProcessWonQuote → (object)`)
- [Codeunit 56 "Sales - Calc Discount By Type"](../codeunit/56.md) (1 call: `ApplyQuoteDiscounts → ApplyInvDiscBasedOnAmt`)
- [Codeunit 7200 "CDS Integration Mgt."](../codeunit/7200.md) (1 call: `OnRun → GetCDSCompany`)

## Called by

- [Codeunit 5354 "Auto Process Sales Quotes"](../codeunit/5354.md) (1 call: `CreateNAVSalesQuotesFromSubmittedCRMSalesquotes → (object)`)

## Recent changes

- 2026-07-24 [#9637 [Event Requests] Add integration events across base app and SMTP module](../../changes/bcapps/9637.md) (main, BC30, feature)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC29

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "CRM Quote to Sales Quote")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
