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
prakashedlprakashedl 

Standard Objects and managed package - Help Needed on Best Practices

We are trying to create a managed package and host it on the appexchange. Our implementation includes standard objects like Leads, Contacts, Events and Campaign. Our concern at this point is the following

  1. We are creating records in these objects. WHat is the recommended approach to consider the required fields or other constraints the customers or subscribers may have for these objects? We are not aware of these constraints/required field and our record inserts may fail. Is this even recommended to use standard objects given this problem?
  2. In test classes to test the solution, we need to create instance of these objects to create data. Will these test classes fail in the subscriber's org because of missing required fields or validation rules/constraints.

Please help and advise the recommended approach. Thanks in advance for your help.

Niket SFNiket SF

Hello Praksshedl,

 

                        for the problem "1" we can not predict what are the required fields are there which are configured via other companies for there ORG. If you are planning to put some setting infomation to these objects you can use custom setting if it's mandatory to create object's of these Account,Lead,Contact then you need to specify in the User Guid. 

 

So there will be configure page where you can show some buttons to create Account,Lead,Contact .... etc.

 

                  for problem number "2".. when any one trying to use your app at that time what are test class failures are avoided. So test failure will not make any effect.

 

 

Thanks 

Nik's