+ Start a Discussion
Starz26Starz26 

Managed Package and Destination Custom Fields

Can a managed package access custom objects in the destination org?

 

More specifically:

 

Suppose:

 

1. I have an object in the managed package and the Name field is the API name of a custom object in the destination org entered by the destination org, and a fldname field is the field name of the object

2. Can a trigger that is part of my managed package access the value of the field in #1 in any way like a describeglobal call or something using the values entered by the destination org?

 

 

 

BritishBoyinDCBritishBoyinDC

I've done something like that - I have a managed package that refers to other packages, but doesn't know which ones will be there when it is installed - so I store the objects/field references in a Custom Setting and then build my queries/dml at runtime...

 

There are some examples here:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_dml.htm

 

 

Starz26Starz26

I think this line in the docs is what puts the nail in the coffin

 

"While Partners can request access to standard objects, custom objects are not included as part of the managed package and can never be referenced or accessed by dynamic Apex that is packaged."

 

I guess it is not possible.....