Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
Hi, I understand to update entitlement status code is not the correct way to do that, but if I need bring it back from cancelled to draft state, how can I do that through SQL
You have tagged your post with "Microsoft Dynamics CRM Online" which means you don't have access to the database - so theres no way to do what you want.
To update state or status with a query you must always speicfy there both values Example you have a quote that is Active and you want to bring it back to Draft statecode you have to specify also the statuscode that it will be in it (and which is associated to the statecode Draft), the query goes like:
-- 1 In Progress Statuscode
--0 Draft State Code
Update QuoteBase set statecode = 0, statuscode = 1
where Quoteid = 'XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX'
But Since you are on MS Dynamics CRM Online you will have to create an app that connects to CRM, and execute the query directly, because you can not access the data base.
Business Applications communities