• VinnySusanth
  • NEWBIE
  • 30 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 9
    Replies
Hi, I added a new boolean field in Opportunity tab and its value in "N" or "Y". It is possible to display the value as "No" or "Yes" in UI by customizing Opportunity tab. I don’t want use a page using visual force.  Thanks Anoop 

Hi everyone,

 

I am facing a strange issue with an SOSL in my apex code.

My SOSL searches against a custom object called Keyword.

 

One of my keyword record has the value " Ivan systems,Mobile Systems,Solution Provider" in one of its long text area(32000) field.

 

String keywordTerm =null;
keywordTerm = 'Mobile*';
Set<Id> validAccountsSetNonFed = new Set<Id>();
validAccountsSetNonFed.add('0013000000AP7Hs');
List<List<SObject>> searchList=[FIND :keywordTerm in all fields returning Keyword__c(Account__c where Account__c IN :validAccountsSetNonFed limit 200)];
List<Keyword__c> accountsWithKeyWord = searchList[0];
System.debug('##########################:'+accountsWithKeyWord);

 

This SOSL returns 0 rows if i give the keywordTerm as 'Mobile*'.

But when i give it as 'Mobile* and *ivan*' it fetches me the record.

 

What could be the reason that this code snippet is behaving in this way.?

 

 

Thanks & Regards,

Vineetha

Hi Everyone,

 

I have a strange issue with the command links in Internet Explorer(6.0 and 7.0).

 

I have created a  visualforce page which has 2 command links.On clicking the command links,it  should takes me to the respective Url's.(Clicking on Link1 takes me to Site1 and clicking on Link2 takes to Site2).This works fine in Mozilla.

 

But in IE,if i click on the link1,it takes me to the site1.Again when i click on link2,it  navigates to site1(instead of site2).

 

Below is the code of my visualforce page:

 

<apex:form >

<li class="link">

   <apex:commandLink target="_blank" action="{!createLinkRelatedResources_Partner}" >{!$Label.Becoming_a_Partner}    </apex:commandLink></li>

<li class="link"><apex:commandLink target="_blank" action="{!createLinkRelatedResources_Contact}" >{!$Label.Contact_Us}</apex:commandLink></li>

</apex:form>

 

 

Is it that i am missing something?.

 

 

Thanks & Regards,

Vineetha

Hi everyone,

 

I have created a Visualforce site with 3 pages.The first is a Search page where i give the search conditions and the results would be then displayed on the 2nd page.These 2 pages are based on a custom controller and it works fine.

 

In the 2nd page when i click on the links of the Search results,it takes me to the 3rd page.the 3rd page is based on a standard controller.When i expose these pages as Site,i am unable to navigate to the 3rd page.It gives an "Authorization Required" error.

I am able to navigate the pages in visualforce with the url.But the site doesnt let me navigate to the 3rd page.I have checked the object permissions and field level security.Also,all the 3 pages are enabled for the Sites.

 

Actually i am passing a Id parameter from my 2nd page.So when the link on the 2nd page is clicked,the following code is invoked.

 

<apex:outputlink value="apex/PartnerProfile=">{!Partner.Account__r.Name}

<apex:param value="{!Partner.Account__r.Id}"/>

</apex:outputlink>

 

Please help me to find a solution to this problem.

 

Thanks & Regards,

Vinny

Hi,

 

I have a Visualforce page where I am displaying a multipicklist field as checkboxes.I am facing an issue with the allignment of the checkboxes in the page.I want my checkboxes to be displayed in 5 rows and 5 columns.

I have tried 2 approaches for doing this:

1) Using a wrapper class to bind the checkbox to the picklist field and then displaying them in the page by looping through a data table.

2)I also tried using the selectcheckboxes option.

 

My problem is that i get the checkbox bound to my picklist value.But the allignment is distorted(either all in same row or in 1 column).

So,i tried using a style class which will provide me the tabular display of the values in the datatable.But still this doesnt help.

Here is the javascript i used:

 

<script>

window.onload = init;

 function init() {

tables = document.getElementsByTagName("table");

for (i = 0; i < tables.length; i++) {

table = tables[i];

if (table.className == 'makeRows') {

makeRows(table,4);

}

}

}

function makeRows(table, columnCount) {

cells = table.rows[0].cells;

cellCount = cells.length;

rowCount = Math.ceil(cellCount / columnCount);

for (i = 0; i < rowCount; i++) {

table.insertRow(0);

}

for (i = 0; i < cellCount; i++) {

row = Math.floor(i / columnCount);

table.rows[row].appendChild(cells[i].cloneNode(true));

}

table.deleteRow(rowCount);

}

</script>

 

 

The datatable in my page looks like:

 

<apex:dataTable value="{!IndustryValues}" var="ind" styleClass="makeRows" >

<apex:column >

<apex:inputCheckbox value="{!ind.selected}"/>

<apex:outputText value="{!ind.induswrap}" />

</apex:column>

</apex:dataTable>

 

Please help me to find a solution to this problem.The styleclass seems to have no effect in the datatable.I am totally lost..

 

 

Thanks & Regards,

Vinny

Hi, I have a Visualforce page which has a provision to enter multiple locations/addresses.On click of a button,it should show me the entered locations in mapquest. I am facing a problem with this requirement where the Mapquest API's refer to some Javascript files(mqexec.js,mqobjects.js and mqutil.js).I tried loading each of the javascript files as static resources and then including them in the visualforce page.But still i face an error as it is not recognizing the methods defiend in these Javascript files.(Eg: MqExec is undefined.) Please help me to find a solution to this problem. Thanks & Regards, Vini

Hi,

 

I have a Visualforce page where I am displaying a multipicklist field as checkboxes.I am facing an issue with the allignment of the checkboxes in the page.I want my checkboxes to be displayed in 5 rows and 5 columns.

I have tried 2 approaches for doing this:

1) Using a wrapper class to bind the checkbox to the picklist field and then displaying them in the page by looping through a data table.

2)I also tried using the selectcheckboxes option.

 

My problem is that i get the checkbox bound to my picklist value.But the allignment is distorted(either all in same row or in 1 column).

So,i tried using a style class which will provide me the tabular display of the values in the datatable.But still this doesnt help.

Here is the javascript i used:

 

<script>

window.onload = init;

 function init() {

tables = document.getElementsByTagName("table");

for (i = 0; i < tables.length; i++) {

table = tables[i];

if (table.className == 'makeRows') {

makeRows(table,4);

}

}

}

function makeRows(table, columnCount) {

cells = table.rows[0].cells;

cellCount = cells.length;

rowCount = Math.ceil(cellCount / columnCount);

for (i = 0; i < rowCount; i++) {

table.insertRow(0);

}

for (i = 0; i < cellCount; i++) {

row = Math.floor(i / columnCount);

table.rows[row].appendChild(cells[i].cloneNode(true));

}

table.deleteRow(rowCount);

}

</script>

 

 

The datatable in my page looks like:

 

<apex:dataTable value="{!IndustryValues}" var="ind" styleClass="makeRows" >

<apex:column >

<apex:inputCheckbox value="{!ind.selected}"/>

<apex:outputText value="{!ind.induswrap}" />

</apex:column>

</apex:dataTable>

 

Please help me to find a solution to this problem.The styleclass seems to have no effect in the datatable.I am totally lost..

 

 

Thanks & Regards,

Vinny

Hi, I added a new boolean field in Opportunity tab and its value in "N" or "Y". It is possible to display the value as "No" or "Yes" in UI by customizing Opportunity tab. I don’t want use a page using visual force.  Thanks Anoop 

I am getting an error when trying to reference a SelectObject component inside of a Visualforce function.  The following code sample, which attempts to set the default value in a dropdown based on an input parameter, demonstrates the issue.  

 

Visualforce Page:

 

 

<apex:page controller="Bug">

<form action="{!$Page.bug}">

<select name="selected">

<apex:repeat value="{!selectOptions}" var="o">

<option value="{!o.value}" {!IF(o.value = selected, 'selected', '')}>

{!o.label}

</option>

</apex:repeat>

</select>

<input type="submit" value="Go!"/>

</form></apex:page>

 

 

Controller Class:

 

public class Bug {

public List<SelectOption> selectOptions {get; set;}

public String selected {get; set;}

public Bug()

{

selectOptions = new List<SelectOption>();

selectOptions.add(new SelectOption('S1', 'Select One'));

selectOptions.add(new SelectOption('S2', 'Select Two'));

selectOptions.add(new SelectOption('S3', 'Select Three'));

selected = ApexPages.currentPage().getParameters().get('selected');

}

}

 

 

 I get the following error when I try to compile the Visualforce page:

 

Save error: Incorrect parameter for function =(). Expected Object, received Text

 

For whatever reason,  the compiler seems to be think SelectObject.getValue() returns an Object rather than a String.  

 

Interestingly enough, when I swap out the controller with the following functionally identical controller, the Visualforce page compiles without issue:

 

 

public class Bug {

public List<CustomSelectOption> selectOptions {get; set;}

public String selected {get; set;}

 

public class CustomSelectOption

{

public String value {get; set;}

public String label {get; set;}

public CustomSelectOption(String value, String label)

{

this.value = value;

this.label = label;

}

}

 

public Bug()

{

selectOptions = new List<CustomSelectOption>();

selectOptions.add(new CustomSelectOption('S1', 'Select One'));

selectOptions.add(new CustomSelectOption('S2', 'Select Two'));

selectOptions.add(new CustomSelectOption('S3', 'Select Three'));

 

selected = ApexPages.currentPage().getParameters().get('selected');

}

}

 

 

 

Any ideas here?  Obviously there is a simple workaround here - but it seems to me that the original code should have compiled just fine.  

 

Thanks,

Greg 

Message Edited by glorge on 03-08-2010 03:05 PM
Message Edited by glorge on 03-08-2010 03:06 PM
  • March 08, 2010
  • Like
  • 0

Hi,

 

One of my users requested that he sees the Account City in his Opportunities list view.

 

I need to first create this field in Opportunities then the data needs to propagate.

 

Thanks,

Pete

  • February 24, 2010
  • Like
  • 0

I am using Apex Data Loader 18 to import records into a custom object I created.  My SDL field mapping file has a line that looks like this:

 

Attorney_Firm_Key=Account\:External_Key__c

 

 

My CSV import is structured correctly, the External_Key__c field exists in the Account object, and it is appropriately marked as an external identifier.

 

I know this general import method can work, as I have successfully imported our company contacts from an external system and linked them to their related accounts with the same "Account\:External_Key__c" value.

 

My problem is that running the import for my custom object fails with the following message:

"Invalid property name 'Account:External_Key__c'"

 

When I look at my Enterprise WSDL, the Account object has External_Key__c listed.

 

Again, I am confused that this would work for importing Contacts but not for importing custom objects.

 

I was able to temporarily work around this issue by using Import Custom Objects under Data Management in our SFDC org.

 

I'd like to know what's going on and how to fix it so that I can setup automated nightly imports using the Data Loader.  Any help would be appreciated.

Hi All,

 

Some days before i did succesfull importing Activities to Leads via Data Loader.

 

Now i can see these Activities on Activity History Related List but unfortunately i can't see it on Reports.

If someone have an idea what is the reason for this I'll be very appreciate!

 

Thanks!

 

 

 

 

Since visualForce doesn't have good  error handling for custom controllers, I am  writing some custom code show error messages.

My custom controller is editing a table.

In the code below, I am a trying to insert a line feed after every error using '\n'. 

However,  when error messages are output, there are no separate lines - it is one big error message. i have tried '\r' as well - doesn't work.

Any thoughts.

Code:
       } catch (DmlException e) {
for (Integer i = 0; i < e.getNumDml(); i++) { string[] fields = e.getDmlFields(i); //strip __c string field = fields[0].subString(0,fields[0].length()-3); integer row = e.getDmlIndex(i); String rowError = 'Row:' + (row+1) + ' Field:' + field + ':' + e.getDMLMessage(i); if (ErrorString[0] <> null) { ErrorString = ErrorString + '\n' + rowError; } else { ErrorString = 'ERROR:' + rowError + '\n'; } }