You need to sign in to do that
Don't have an account?
amorgan
How can I check if my page is in a managed package?
I need a good way to know if I'm in a managed package with a namespace or not.
If I use sforce.connection.query(soql) the query string will be different depending if the page is managed or not.
Example, if I'm in a managed packaged the query string would be
soql = "select myNamespace__myCustomField__c from myNamespace__myCustobObj__c"
but, when I deploy to another server my code becomes unmanaged and the query string needs to be:
soql = "select myCustomField__c from myCustobObj__c"
So, what's a good way to know if the code is managed or not so I can use the correct query string?
If I use sforce.connection.query(soql) the query string will be different depending if the page is managed or not.
Example, if I'm in a managed packaged the query string would be
soql = "select myNamespace__myCustomField__c from myNamespace__myCustobObj__c"
but, when I deploy to another server my code becomes unmanaged and the query string needs to be:
soql = "select myCustomField__c from myCustobObj__c"
So, what's a good way to know if the code is managed or not so I can use the correct query string?
One thing i would like tell you
Name Space is Organization specific and unique to that application and unique in force.com application data based.
if you are maintaing unmanaged code i belive accourding too documentation it wo't requries name space.
you can find out you appplication having namespace or not using following things
1.Salesforce.com server URL eg.https:\\namspace.na2.salesforce.com
2.checking the components
etc.
All Answers
One thing i would like tell you
Name Space is Organization specific and unique to that application and unique in force.com application data based.
if you are maintaing unmanaged code i belive accourding too documentation it wo't requries name space.
you can find out you appplication having namespace or not using following things
1.Salesforce.com server URL eg.https:\\namspace.na2.salesforce.com
2.checking the components
etc.
Would you explain #2 please?
components means custom object ,custom objects fields and VF page.
R u packaging yours application or not.If so it is managed or unmanaged.
Both. It's managed when it's packaged and unmanaged when it's deployed to a server.