dino ursic
  • Member for 8 years, 2 months
  • Last seen more than a month ago
  • Cologne, Germany
Filtering by Long Text Area field in SOQL
Accepted answer
33 votes

You can not use text area fields in SOQL and SOSL filter criterias. Try this approach: List<Project__c> projects = new List<Project__c>(); for(Project__c proj : [SELECT Name, Status__c, ...

View answer
Create one table of multiple object types
Accepted answer
10 votes

You could use inner wrapper class as an abstraction of your vehicle object, create and populate list of those custom objects, and finally make the binding in the VF page to use the list of custom ...

View answer
Passing method parameters with apex:actionFunction
9 votes

If you want to pass data which does not require scope within the whole controller class, but rather requires to be visible only in the scope of called controller method, maybe you could consider using ...

View answer
Using SOSL with where clause
Accepted answer
8 votes

As per the Developer Guide on SOSL WHERE clause, it is used to filter the search results: By default, a SOSL query on an object retrieves all rows that are visible to the user. To limit the search, ...

View answer
onComplete javascript function in actionFunction behaves differently. Why?
Accepted answer
7 votes

Well, you've kinda answered your own question with this: Each of the tab contains an actionFunction with the same name "methodOneInJavaScript" Let's say, if you create a simple page with several ...

View answer
MALFORMED Query, unexpected token
Accepted answer
6 votes

Where do you assign value to annualVolume variable? If it's a JS variable in the global scope, you cannot simply pass a JS varible to the query by placing it in the query string. What you should do is ...

View answer
Unable to reference a formula field in roll up summary
5 votes

Rather than using formula for field Broker_value__c, you could use regular number/currency field in combination with workflow field update (workflow rule set to update the field upon record update). ...

View answer
How to convert the following date format in salesforce
Accepted answer
5 votes

You already have a date 'as a date', not as a string. The format you are talking about (2014-01-20 00:00:00) is just a visual representation of a value contained in variable of a DateTime type. If you ...

View answer
Disabled attribute not present for apex:inputfield. Any alternatives?
5 votes

In your VF page, use both components, inputField and outputField with opposite rendering condition. What you have to pay attention to is to update the components everytime an action specified in ...

View answer
Regarding Arrows(' ▼',' ▲') in Visualforce Page
4 votes

Replace the symbols in the code with their respective HTML entities - which would be &#9650; for the upward triangle and &#9660; for the downward triangle. <apex:commandLink value="...

View answer
mapping data from two different tables
4 votes

As zuke had already mentioned, you should use wrapper class to store data from both queries. However, in the wrapper class I'd go with the data types which fully describe the objects that they store. ...

View answer
How to call two methods on button's onClick method in Vf Page?
4 votes

To call apex class (controller) function named savePDF(), use apex:commandButton component with action attribute binding set to {!savePDF}, calling the savePDF() method of the underlying controller: &...

View answer
Call JavaScript function in VisualForce Page
Accepted answer
4 votes

There are quite a few ways you can call javascript function on your page, it all depends on what you are trying to achieve. Do you want the makeRowInit() js to be fired once the page is loaded or on ...

View answer
How to write validation in visualforce
4 votes

If you really must use custom validation (although I don't see why regular validation rules would not work), you can use the following approach. Add pageMessages component at the beginning of your ...

View answer
Issue with conditional statement in apex:repeat inside javascript
3 votes

I think you have somewhat of a misunderstanding of client-side vs server-side technologies. Based on your code snippet, the IF conditions that you mentioned in the original post are just simple ...

View answer
JSON.serialise give output with escape charater
Accepted answer
3 votes

Here is a solution to a similar problem: To return a string without the quotes, set it as the response body: RestContext.response.addHeader('Content-Type', 'application/json'); RestContext....

View answer
How to get look up field id in controller
3 votes

Quite simple actually, just use lookup's field id as the binding in the VF page. E.g. let's say you have VF page on which you are editing YourObject__c, and that object has a lookup field named ...

View answer
Input Field Visibility based on Profiles in VF Page
3 votes

You can use !$Profile global variable to access current user’s profile, combined with disabled attribute on the apex:inputText component: <apex:inputText value="{!inputValue}" id="inp1" disabled="{...

View answer
How to make valid JSON Response from http POST method's Response?
Accepted answer
2 votes

The problem is you are not setting proper Content-Type response headers. In your response to Ashwani, you stated that you added res.addHeader(), but that line will not make much sense, if you are not ...

View answer
Add custom action to Action column on list view
2 votes

The closest to what you're trying to achieve would be creating a new formula field on the Opportunity object, set it's return type to text, and in the formula expression enter the HYPERLINK function ...

View answer
Translate Custom Reports and Dashboards name in other language
2 votes

I know the question is almost two years old, but I wanted to share my approach, as I too found the above solution (cloning reports for each language) to be quite daunting in an organization with a ...

View answer
Include single quotation mark in string
2 votes

You can try using html-entity for the single quotation mark: if(txo.Target__c != null){ targetsToCreate.add(txo); }else{ o.addError(' Please ask your Salesforce Administrator to add a target ...

View answer
Metadata API in Eclipse - File named in Package.xml but not in Zipped directory
2 votes

Not sure whether your problem is still present, but I'll post my findings as it took me > 3 hrs to finally reach a breakthrough. Basically, I had encountered the same issue as you, where I was unable ...

View answer
Create Javascript Button in VF Component
2 votes

You can add a regular html input element to the page and mimic standard button's look&feel by adding 'btn' class: <input type="button" class="btn" value="JS Invoking button" onclick="alert('...

View answer
How to reset the form using JavaScript?
2 votes

You were trying to fetch dom element by id but didn't used string literal in doing so. To retrieve an element with the id form1, you should place the string literal form1 in (double) quotes, like so: ...

View answer
Maps: adding more (related) sObjects than key values using PUTALL method
2 votes

So, basically, you would like to have a map of key-value pairs, where key is the AccountID, and the value is list of Contracts related to the Account? If so, first of all, rather than having Map < ...

View answer
How to ignore Salesforce CSS on VF Page (with header)
2 votes

You can still use your custom stylesheet, loaded through apex:stylesheet component, but to make sure your styles will override the SFDC ones, you should target the css selectors to be more specific ...

View answer
In Visual Force Page not able make contact owner inlineEditable
Accepted answer
2 votes

You should be using apex:inputField rather than apex:outputField. As SFDC documentation states, outputField is... A read-only display of a label and value for a field on a Salesforce object. What ...

View answer
Please help me to understand the below javascript code and usage of outputpanel. step by step since i'm new to salesforce
Accepted answer
2 votes

The JS function toggleContacts() accepts className as argument. It then searches the DOM for the element with the specified class (e.g. if a function is called with argument "green-panel", like so: ...

View answer
How to hide the button when clicking other button using VF page?
2 votes

You can use apex:commandButton's either onclick or rendered attribute to set visibility of the button. First approach will hide the button on the client only, while second will not render the button ...

View answer