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
dorozcodorozco 

describe apex dynamic apex help app develop

HI

I have a issue, i have a app that i develop that is focus in contracts, this app use contracts of salesforce and i' add more custom fields and more components, also develop a custom object called contract-X  that is equal as contract of salesforce.

the main issue is that i want that if the customer install this app and if the client has Salesforce CRM and object contract my app works with this object and all mi components page, triggers other objects and not with contract_X,  but if the customer has'nt crm salesforce if he has force.com  my app works with my custom object contract_X and customs components,   

 

some people said me about  describe apex or dynamic apex  but  i dont know how to use or how to implement on my app i'm really confused 

i hope you can help me 

 

my app hass

 

contract                  contract_X__c

contacts                 contacts

accounts                accounts

subcontract__c      subcontract__c

terms__c                terms__c

 

i dont know if i need to reestructure my app of where add describe apex 

:-(

 

JitendraJitendra

Please have a look on below post for few code snippet of dynamic apex:

 

http://shivasoft.in/blog/salesforce/very-useful-tips-and-tricks-of-the-apex-salesforce-interview-questions-part-4/

 

I hope you will get the idea about "Dynamic Apex"

JitendraJitendra

I dont know exactly what you are going to implement but you just want to check whether target org contains Contract or not?

 

I dont think that it appropriate design because you will face problem at lots of places like Report. Which report you are going to provide to customer if needed. You will need to do lots of checks and lots of validations.

dorozcodorozco

yes this is the main idea 

i want to develop 2 versions for this app(one for add componets and customs objects to a Contract , and other version for customs objects components and the contract_X), but the customer wants only one package  on app 

and this app run wihtout reports 

 

i dont know if it is possible with dynamic and describe apex  ,  because one customer already has records on contracts and only wants add funcionality but other customer dows'nt have contract and he needs contract_x and funcionality 

 

:-s

 

thanks for your time and your help