0

I am using fflib library and querying OpportunityContactRole object in trigger. But its throwing below error -> Opportunity_Trigger: execution of BeforeUpdate caused by: System.QueryException: No such column 'CurrencyIsoCode' on entity 'OpportunityContactRole'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

there is no CurrencyIsoCode field on OpportunityContactRole object, The currency field is added by fllib. can anyone please help me on this ?

0

1 Answer 1

1

The reason for this error is your version of class fflib_SObjectDescribe is too old to recognize the recent addition of CurrencyIsoCode in OpportunityContactRole

This field was added in V47.0 - see Object Ref Guide

Update the version of class fflib_SObjectDescribe to at least V47 and then to test, use this execute anonymous

fflib_SObjectDescribe.FieldsMap fMap = fflib_SObjectDescribe.getDescribe(OpportunityContactRole.SobjectType).getFields();
System.debug(LoggingLevel.INFO,fmap);

You can safely update the version of this fflib class without having to touch other fflib class versions.

1
  • My current apex class version was 40.0 and fflib class version is 47.0. That's why I was facing this issue. The currencyIsoCode is added in version 47.0. Thanks Nov 4, 2020 at 6:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .