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
Mack DsozaMack Dsoza 

Explain me error

 

System.DmlException: Upsert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Fund: id value of incorrect type: a06N00000009bFoIAI: [Fund__c] 
Class.InvestmentAssetServices.save: line 101, column 9 Class.InvestmentAssetController.save: line 113, column 13 External entry point

_Prasu__Prasu_

I think you are assiging id of the record which is not of type Fund__c to the field Fund__c.

 

just trying viewing the a06N00000009bFoIAI record in your Salesforce instance.