• Karimov Ceyhun
  • NEWBIE
  • 5 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 12
    Replies

Hi,

 

is there any way to create custom fields of type 'long text' in custom settings? I coulnt see long text type while creating custom fields in custom settings. This seems very weird.

 

Thanks

 

Ceyhun Karimov

Hi,

 

I am new to force.com applications. I am supposed to use custom settings objects in my application. When i looked some examples and tutorials, i saw that only getter methods are used in custom setting objects in apex code. So is there any way to create some custom settings objects, modify their fields, insert new data to its fields through apex code?

 

 

Thanks

 

Ceyhun Karimov

Hi,

 

is there any way to create custom fields of type 'long text' in custom settings? I coulnt see long text type while creating custom fields in custom settings. This seems very weird.

 

Thanks

 

Ceyhun Karimov

Hi,

 

I am new to force.com applications. I am supposed to use custom settings objects in my application. When i looked some examples and tutorials, i saw that only getter methods are used in custom setting objects in apex code. So is there any way to create some custom settings objects, modify their fields, insert new data to its fields through apex code?

 

 

Thanks

 

Ceyhun Karimov

We're interested in updating records when the value of a Custom Setting changes.  I was wondering if anyone knows if you can fire a trigger on update for a Custom Setting value?  There does not seem to be anyway of programatically inserting or updating the information held,  so,  a trigger appears to be the only option of automating the updates.

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.

 

Is this possible with apex and metadata api ?

Hi all,

 

I have a selectList and I am populating the values of the pick list by doing an AJAX call to a function in the controller. It all works fine but when i try to edit the values on the form and click on the submit button, it gives me an error "Value is not valid.". It forgets what the picklist values are when i click the submit button.

 

Any help is appreciated!!

 

Regards

Mukul

  • October 22, 2009
  • Like
  • 0