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
roni shoreroni shore 

list<AccountContactRelation> error

If i am using List of ACR object it throwing compoile error
List<AccountContactRelation> acrlist = new List<AccountContactRelation>();

pls suggest
 
Best Answer chosen by roni shore
Khan AnasKhan Anas (Salesforce Developers) 
Hi Roni,

I trust you are doing very well.

Make sure you are using the latest API Version. Any lower version will fail to compile if it references the AccountContactRelation object. You might use the most up to date version.

Find Salesforce Edition and API Version :
https://help.salesforce.com/articleView?id=000199268&type=1

Also, make sure you enable this feature from Setup menu.
From Setup, enter Account Settings in the Quick Find box, then select Account Settings. Select Allow users to relate a contact to multiple accounts.


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas​

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Roni,

I trust you are doing very well.

Make sure you are using the latest API Version. Any lower version will fail to compile if it references the AccountContactRelation object. You might use the most up to date version.

Find Salesforce Edition and API Version :
https://help.salesforce.com/articleView?id=000199268&type=1

Also, make sure you enable this feature from Setup menu.
From Setup, enter Account Settings in the Quick Find box, then select Account Settings. Select Allow users to relate a contact to multiple accounts.


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas​
This was selected as the best answer
roni shoreroni shore
thanks man!!, it was version issue