Data Migration of Quote and Quote Product – few key points (Dataverse/Dynamics 365/ SSIS)


Below are the different out-of-the-box statecode and statuscode for the Quote table.

Status (statecode)

Status Reason (statuscode)

0 (Draft)

1 (Inprogress)

1 (Active)

2 (Inprogress)

3 (Open)

2 (Won)

4 (Won)

3 (Closed)

5 (Lost)

6 (Canceled)

7 (Revised)

Now if we are trying to migrate Quote records that are in either 2(Won) or 3(Closed) status (statecode), our package will fail and we will get the below error.

{“error”:{“code”:”0x80040233″,”message”:”Quote can’t be closed because it is in Draft state. Only Active Quote can be closed. Please activate the Quote and then try to close it.”}} -batchresponse_aa072eca-fd15-4067-8f2b-41f7b3dfad1c– )System.Net.WebException

This is because we cannot directly create the Quote record with the status either Won or Closed.

It will create those records with the status Draft instead.

However we can create Quote records with either Draft or Active status, we will not get the above error.

Now another point to be considered is, if we are moving the quote product record also, is that we cannot associate the quote product to a quote if it is in Active or Closed / Won status, it has to be draft status for the quote product to be associated.

If we try adding / associate Quote Product to either an Active or Closed Quote, we will get the below error –

A screenshot of a computer

Description automatically generated

: The remote server returned an error: (400) Bad Request. (Error Type / Reason: BadRequest, Detailed Message: {“error”:{“code”:”0x80043b09″,”message”:”The detail cannot be updated because the parent is not editable.“}})System.Net.WebException (Status Reason: BadRequest): The remote server returned an error: (400) Bad Request.”

And as expected with Draft Quote we can associate quote products.

A screenshot of a computer

Description automatically generated

So basically if we are planning to migrate Quote and Quote Product to Dataverse/Dynamics 365

  • First, move all the Quote with status as Draft (i.e. do not map statecode and statuscode)
  • Then associate Quote Product to it. (also certain fields are only available for update and not create, you could run update Quote Product package to update those fields)
  • Next, we can update all the Quote as Active (along with any other fields that are available only for update and not create), and then run another update package to update the actual statecode and statuscode values as now from the Active status we could move to draft or closed status without any issues.

And also please check the CRM Migration Starter Kit for further details and guidance.

https://www.kingswaysoft.com/blog/2020/12/17/Announcing-Migration-Starter-Pack-v40-for-Microsoft-CDS-and-Dynamics-365CRM

Hope it helps..

Advertisements


Discover more from Nishant Rana's Weblog

Subscribe to get the latest posts sent to your email.

Unknown's avatar

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

One thought on “Data Migration of Quote and Quote Product – few key points (Dataverse/Dynamics 365/ SSIS)”

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Nishant Rana's Weblog

Subscribe now to keep reading and get access to the full archive.

Continue reading

Power Platform Puzzles

D365 CRM, Power Platform Tips &Tricks

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Microsoft Business Applications Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog - PPUG.ORG

AI - Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue

The Professional Paraphraser

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.