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
Mari GanesanMari Ganesan 

DML operation error(Database.Upsert)

We have a functionality which will populate opportunity team members in opportuntiy when the lead is converted. In one case, i changed the record owner field from the default (Lead owner) and converted the lead. In this case, The opportunity team member is not populated.

 

In debug log, i checked all the functions invoked when the leads is converted. Here the function which  inserts the opportuntiy team was called and successfully upserted (here inserted the new record) the record (I have seen the ID of the record and isSuccess field is true). But i could not see the record in the salesforce. when i try to access the record, It says The data is unavailable.

Vinita_SFDCVinita_SFDC

Are you sure that you have the access on the upserted record, can you query on the upserted record through workbench or force.com IDE??

Mari GanesanMari Ganesan

I should have access to the record since i have system admin profile. Also as you told, i tried to query the reord via workbench, it returned no record.  Appericiate your help with this.

Avidev9Avidev9
Can be a licensing issue as well what kind of license you are using ? By any chance Platform ?
Mari GanesanMari Ganesan

License: Salesforce

Platform: Unlimited version