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

Calling Internal class from Global class

I  have a class name SMAPI which is a global class and SM which is a class.SM class returns some functionality of updating the records as per the checkboxes subscribed or unsubscribed and saves it in the salesforce.

As of now SMAPI class is used for talking with external system and SM class is used for visualforce page within salesforce.

I want to use just one class for both the external and internal requirements. In this case can i call the SM class within SMAPI class when we use for the external system.

Is this a good idea..

Any thoughts or help is appreciated.




If both the classes are to be used in a single page, then you can can one single class. However, if you think that you will use SMAPI in future on some other pages, the better idea is to keep it separate as it will be easier for you to implement.