function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Diwakar GDiwakar G 

Can't change quote owner. Enable quotes without parent opportunities

When I tried to change the Quote Owner with current user I am getting the following error. Please help me.
Update failed. First exception on row 0 with id 0Q07F000000iCUWSA2; first error: FIELD_INTEGRITY_EXCEPTION, Can't change quote owner. Enable quotes without parent opportunities.: [OwnerId]
Error is in expression '{!processSelected}' in component <apex:commandButton> in page example_sprint: Class.CC_Contacts_Controller2.processSelected: line 130, column 1

An unexpected error has occurred. Your development organization has been notified.

As per your implementation, once you try to change owner, class gets call and throws the exception. Please check the details in given class on line 130.
Class.CC_Contacts_Controller2.processSelected: line 130

Diwakar GDiwakar G
for(Quote con: selectedContacts) {
            con.OwnerId= userInfo.getUserId();
            update con;
Thanks for reply. The highlighted line is the line number 130.
Hi Diwakar,

Please check the value for OpportunityId field on quote, try populate OpportunityId field value and check if problem gets resolve.
Diwakar GDiwakar G
Thanks for reply. I am trying to make the Quote owner as current user. If I try to change the corresponding opportunity of Quote to current user that is working fine. The problem is with changing of Quote owner.
As of today, quotes cannot be reparented due to the error you encountered, and the only solution (that is, enabling quotes without parent opportunities) was removed by Salesforce. Per their support:

"Upon checking this I'd like to inform you that this feature was only available for a brief period of time way back Winter '18 release as a pilot feature before. However, the Product Management team has found several security issues and they have deferred the release of this feature until these issues have been resolved. With that being said, Salesforce Support cannot provide an exact date on when the feature will be available for use or enablement. Unfortunately, this feature's GA did not get released and we currently have no ETA for its release date."

You can upvote this idea to encourage Salesforce to deliver a new solution: