Reply
Regular Visitor
Impact
Posts: 2

Best practice: reference to apex-lang? Maximum code size: 1MB

Hi,

 

I develop an application which already has quite a lot of code: Total Apex Size: 862800 of 1000000

 

The application I develop is intended to be sold to many customers - not to be installed only on one Organization.

 

Until now I included apex-lang in the code of my project.

 

What is the best practice to using apex-lang? Would you recommend to leave the apex-lang code inside of the project, or to remove it and reference to it? In the second case, would the apex-lang package be installed automatically every time a customer installs my application?

 

Thanks for your hints and suggestions

Moderator
Pradeep_Navatar
Posts: 1,451

Re: Best practice: reference to apex-lang? Maximum code size: 1MB

You can create generic Apex classes for different functions and can call these classes in Apex Triggers or some other Apex classes. Try to use maximum SFDC built in functionality such as formula fields, workflows, validation rules etc.

 

The items in the manage package, including apex classes and triggers, installs in Client Org without any extra efforts. You don't need to worry about it.

 

Hope this helps.

 

Pradeep Bhatnagar
Navatar Group
Trusted Contributor
d3developer
Posts: 347

Re: Best practice: reference to apex-lang? Maximum code size: 1MB

I suggest copying and pasting methods and classes from apex lang into a Utils class as you need them.