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
Prashant Ranjan 12Prashant Ranjan 12 

how to create a custom field of type multiselect on standard object through an apex class

PriyaPriya (Salesforce Developers) 

Hi Prashant,

You can create custom fields through apex call by using Metadata API.
Check below example that matches your requirement :-
https://www.forcetalks.com/salesforce-topic/can-we-create-a-custom-field-through-salesforce-apex/#:~:text=You%20need%20to%20first%20generate,CustomField()%3B

Please mark as Best Answer so that it can help others in the future.

Regards