• Faiza Naz
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hi,
I have a requiremnt where i want to know that specfic pacakge exsist in the enviroment or not.If it is not present in the enviroment than show an error.
 Is there any way to identify that an specfic package is installed in the enviroment or not via using apex?
Any one who as idea/sample code regarding this please help.

Thanks,
Hi,
I have a requiremnt where i want to know that specfic pacakge exsist in the enviroment or not.If it is not present in the enviroment than show an error.
 Is there any way to identify that an specfic package is installed in the enviroment or not via using apex?
Any one who as idea/sample code regarding this please help.

Thanks,

I recently ran into a problem where a Visualforce page was throwing a cryptic error message related to a custom picklist (apex:selectList).  The complete error was something like:

 

j_id0:frmSelectProductsServicesw:filterSection:j_id10:j_id15:selectedPF:Validation Error: Value is not valid

 

After some digging and research here in the forums, testing and a call to Tech Support it seemed the cause and solution for similar problems didn't quite apply.  I eventually found the solution (in my case) and wanted to share it in hopes that it would help others.

 

The cause was due to a conflict between the underlying stored data in SFDC and how certain controls behave when rendered to HTML.  In this case, there was a double space embedded in the underlying data between the Z and I in the value Product.Family field (eg. ‘S&U Z  Internal’). 

 

Background:

  1. For Visualforce controls (ie. apex.outputField, apex.outputText, apex:selectList) and modes (ie. edit and view), every control ultimately must renders as HTML.  Typical HTML rendering behavior suppresses any extra spaces within text.  That is why it is common practice to use the &nbsp to chain multiple spaces together. 
  2. In this case, the underlying stored data in the Product.Family field included a double space:
          ‘S&U Z  Internal’
    however when it was rendered to the screen, the HTML took control and used only a single space:
          ‘S&U Z Internal’
  3. Once the user clicked the submit button to begin the search, the picklist in this case tried to cross-reference the selected value with the actual data that was bound to the control and found no match, thus the cryptic error that was returned - “selectedPF:Validation Error: Value is not valid”.
          ‘S&U Z  Internal’ != ‘S&U Z Internal’

 

Funny thing is, when the underlying data is rendered in a input textbox (ie. apex.inputText), the double space is displayed.  Once I removed the double space from the underlying data, the error was fixed.

 

Hopefully this solution helps.

Thanks to Sreenivas Voore in Premiere Tech Support.

 

 

hi,

 

is there any way to list out all the objects available in a n SF instance?

 

i'm using JAVA and an enterprise WSDL.

 

please help to solve this issue.

 

 

regards,

MM Praneeth