• Sidz
  • NEWBIE
  • 140 Points
  • Member since 2010

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 50
    Replies

Hi,

 
I have some "System.debug" statement in my apex test class.. Where can I see the output of these statements in eclipse after executing the test class? I am aware of checkin in salesforce org thru debug logs. But I am not sure how to check in eclipse. Please help me on this.
 

Thanks,
Jbabu.

  • March 28, 2012
  • Like
  • 1

Hi good people,

I have a visualforce page that displays a list of unresolved emails record.However,i would like each user to be able to view only his records i.e owner.name == user.name.Thus only view records that he/she owns.

Below is my visualforce page.

 

<apex:page controller="UnresolvedEmailsController" >
<apex:form >
  <apex:pageBlock title="Unresolved Emails" mode="edit">


 <apex:pageBlockTable value="{!unresolvedEmails}" var="Emails" >
 
                <apex:column >
                        <apex:facet name="header">Subject</apex:facet>
                        <apex:outputlink value="/{!Emails.id}">
                        <apex:outputField value="{!Emails.Name}"/>
                        </apex:outputlink>
                </apex:column>
                <apex:column >
                        <apex:facet name="header">From</apex:facet>
                        <apex:outputField value="{!Emails.From__c}"/>
                </apex:column>
                <apex:column >
                        <apex:facet name="header">Assigned To</apex:facet>
                        <apex:outputField value="{!Emails.Assigned_To__c}"/>
                </apex:column>
                <apex:column >
                        <apex:facet name="header">Owner</apex:facet>
                        <apex:outputField value="{!Emails.owner.name}"/>
                </apex:column>
                 <apex:column >
                        <apex:commandButton value="New Contact" action="{!newContact}" reRender="hiddenBlock">
                                               
                           <apex:param name="unresolvedEmailId"
                            value="{!Emails.id}"
                            assignTo="{!unresolvedEmailId}"/>
                        </apex:commandButton>
                        <apex:pageBlock id="hiddenBlock" rendered="false"></apex:pageBlock>               
                  </apex:column>
        </apex:pageBlockTable>
         
                  <apex:panelGrid columns="4" style="text-align: center; vertical-align: middle;">
                    <apex:commandLink action="{!first}">First</apex:commandlink>
                    <apex:commandLink action="{!previous}" rendered="{!hasPrevious}">Previous</apex:commandlink>
                    <apex:commandLink action="{!next}" rendered="{!hasNext}">Next</apex:commandlink>
                    <apex:commandLink action="{!last}">Last</apex:commandlink>
                </apex:panelGrid>
    </apex:pageBlock>
</apex:form>
</apex:page>

I have this specific problem where I have two Objects 1) Keyword__c and 2) Account. They have master-detail relationship. Now I want to create a table where I want to display each value from Keyword__c in one column and count of Account for that from Master-detail relationship in other column. I tried something like below but I haven't been successful.

 

My Visualforce page has 

 

<apex:pageBlockTable title="Results" value="{!AllKeyword}" var="k">
<apex:column value="{!k.kw__c}" headerValue="Keywords" />
<apex:column headerValue="Count" value="{!KeywordCount}">
<apex:param name="kw" value="{!k.kw__c}"/>
</apex:column>
</apex:pageBlockTable>

  but it says 

 

Error: You may specify either a ''value'' attribute or a body for the column component, but not both	

  

and controller has 

 

public Integer getKeywordCount() {
  Integer cnt;
  String keyID;
  String kw = ApexPages.currentPage().getParameters().get('kw');  
   keyID = [Select Id from Keyword__c where kw__c = kw];  
   cnt = [Select count() FROM KeywordAccountAssociation__c Where Keyword__c = keyID];
  return cnt;
  }

 

but it says 

 

Error: companyDashboard Compile Error: unexpected token: 'kw'

 

Appreciate any help.

Hi,

 

I am new to salesforce.com.

 

When I create a customer Account field with multi-select Picklist data type, can I have the values from a query of my account data? In this case, I want to show in the list of all accounts that match a specific Account Type.

 

Do I have to wrote some code to do this? I'd appreciate if someone can point me to some 101 course to learn how to do it.

 

-- vj

  • January 23, 2012
  • Like
  • 0

The following is my code i retrive it from quote line items....i am rendering it as pdf ..i am able to get the table with serial num as what i give in the quote as 1 , 2 ,3 etc...in the table, but i want the table to break after serieal num 1 and separate table for 2 and so on...plz hlp me out...

 

 

 

<table border="1" width="100%" id="table4">
<tr>
       <td bgcolor="#C0C0C0"><font face="Arial">S.No:</font></td>
       <td bgcolor="#C0C0C0" width="40%"><font face="Arial">Product--Description</font></td>             
       <td bgcolor="#C0C0C0"><font face="Arial">QTY</font></td>
       <td bgcolor="#C0C0C0"><font face="Arial">Unit Price</font></td>
       <td bgcolor="#C0C0C0"><font face="Arial">Total Price</font></td>
</tr>
 
<tr>
       <apex:repeat value="{!QuoteLineItem}" var="a">
          <tr>
            <td >{!a.Serial_Num__c}</td>
        
             <td width="40%">{!a.PricebookEntry.Name}--{!a.Description}</td>
            
             <td>{!a.Quantity}</td>
             
             <td><apex:OutputField value="{!a.UnitPrice}"/></td>
             <td><apex:OutputField value="{!a.TotalPrice}"/></td>
                  
             
          </tr>
       </apex:repeat>  
</tr>

<tr>

 

 

 

 

Hi,

I have been hearing mixed opinions about what connected apps are used for in salesforce.com.Can anyone please clarify if connected apps can be used to prevent access to Salesforce.com api's for a particular user.

 

Our main use case is to 

Prevent selected list of users from using ANT migration tool,Data Loader.

 

 

Any idea or thoughts is very much useful to me .

 

Thanks,

Sid

  • February 13, 2013
  • Like
  • 0

HI,


There is a lot of confusion regarding the code coverage calculations for me, please help me understand how to get proper code coverage and test results.

I have been using some of the options available in salesforce.com related to running unit tests.please suggest the correct approach.

 

1)If i clear the test history and use apex test execution ,will it update the code coverages of all classes ,
For some classes the code coverage is displayed as 0% and when i click on the "0%" link it shows some code coverage and when the class view page is refreshed it shows a different number.

Can we use apex test execution to calculate code coverage? 

 

2) when i run all tests it clears the test history and runs all the tests.Is the code coverage calculations accurate when i use this ?

 

3)A clear code coverage on setup->apex classes page , it is not deleting the test history but is clearing the code coverage. when should we use this ?

 

4)There is link on setup->apex classes page "Calculate organization wide code coverage" when should we use this ?

 

Please provide your comments .

 

Thanks,

Sidz

  • August 03, 2012
  • Like
  • 0

Hi People,

 

Am not able to add "description" field to the event list view .

I have tried to add record type filters also, but it is not helping. 

as per my observation "description" is a long text area , but for any other custom object list views we can add long/rich text area fields.

 

is there any way i could add description to list views.

 

Any information related to this would be great.

 

Thanks,

Sidz

  • April 03, 2012
  • Like
  • 0

Hi ,

 

Am not sure if this question falls under general development category but i couldn't find any category related to deployment.

 

I want to migrate the search layouts using ant migration toolkit or eclipse, 

please suggest if there is any way to migrate that.

 

Thanks,

  • March 27, 2012
  • Like
  • 0

Hi,

I wanted to display the exceptions in a user friendly way on a visualforce page.

For example: the exception message i get is something similar to the one below

" xyzAfterInsert: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0 with id xxxxxxxxxxxxx; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, The Close Date of the Opportunity cannot be in the past. Please update it accordingly.: [] Class.xxxxx_UpdateOpportunity.updatexxxOpportunity: line 159, column 1 Trigger.xyzAfterInsert: line 29, column 1"

 

instead i want to display

"The Close Date of the Opportunity cannot be in the past. Please update it accordingly"

 

how can i do that ?

thanks,

sid 

  • March 26, 2012
  • Like
  • 0

Hi,

 

On click of a New button on object's related list ,  i want to check if the user has read / write permission or not .
how would i do that ?

 

Thanks,

Sidz

  • January 23, 2012
  • Like
  • 0

Hi,

 

Can we migrate the mobile configurations from one sandbox to another ?I was not able to find any references to mobile configurations in migration toolkit document or in changeSets .


 please suggest.

 

Thanks,

Sidz

  • January 23, 2012
  • Like
  • 0

Hi ,

How can we debug when we get a error code like this 

Error Number: 407524215-12825 (-1072421861)

is there a reference for such numbers?

 

please help

 

Thanks,

sidz

  • May 23, 2011
  • Like
  • 0
hi, i am trying to override the functionality of a button on a related list in salesforce standard page. i have added a visualforce page to that layout and am trying to change the properties of the parent page(the vf page is kept in a iframe) it throws me an error that cross domain scripting is not allowed. i am able to achieve the same using scontrols but salesforce is planning to withdraw support for them or it is not in best practice to use them. what is the alternative ? Thanks in advance, Sidz
  • July 29, 2010
  • Like
  • 0

Hi,

I have generated the enterprise WSDL in salesforce and now I want to connect to the salesforce from soap UI using the WSDL.

I want to see the response for certain webservices.

I have soap UI standalone app and also the one configured in eclipse ganymade and these can connect to internet using proxy.

 

please help me with steps to configure soapUI in eclipse or in the standalone app with any settings specific to proxy.

 

Thank you

 

 

 

Sidz

  • July 16, 2010
  • Like
  • 0

Hi,

There are issues with the new Rich text area field which is available for the salesforce knowledge.

When I am trying to alter the field level security of a field which is rich text area it is not reflecting.

It is working in a wierd manner.

 

Example:

I have 2 fields rta1 and rta2 which are rich text area fields.

rta1 visible(true) read only(false)

rta2 visible(true) read only(true)

 

these are the settings for my custom profile which has both view and manage articles enabled.

When I go into the article management tab it is making both fields read only.

 

Its is happening when I am having multiple rich text area fields and when I mark one of them as readonly the remaining RTA fields are also not editable .

 

 

Please help me with this.

  • June 28, 2010
  • Like
  • 0

can we create a lookup field for articletype object.

i want to add a lookup field of a custom object to the articletype custom field.

 

or

 

is there a way to add adittional functionality for the edit pages of the article.

i want to add more functionalities other than default ones .

 

please help me with this

  • June 16, 2010
  • Like
  • 0

hi,

i am trying to retrieve the search result data but i always end up with some exception

 

query1:

FIND 'map*' IN ALL FIELDS RETURNING Developer__kav (id)

Compile Error: line 1, column 14: Implementation restriction: When querying or searching the Developer__kav object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or PublishStatus = [status]. In addition PublishStatus is only permitted in a top-level AND condition.

 

now i have added the PublishStatus='Online'

query2:

system.debug([FIND 'map*' IN ALL FIELDS RETURNING Developer__kav (id) where PublishStatus='Online' ]);

Compile Error: line 1, column 70: expecting right square bracket, found 'where'

 

 

i have configured my sandbox demo in the eclipse and tried to access the data from the article object 

but i get this error

 

 

unable to open SchemaBrowse.
Reason:
Malformed_query - Implementation restricition: when 
querying or searching the test__kav object,you must filter using the fo

 

unable to open SchemaBrowser.

 

Reason:Malformed_query - Implementation restriction: When querying or searching the Developer__kav object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or PublishStatus = [status]. In addition PublishStatus is only permitted in a top-level AND condition.

 

please help me fix this

  • May 13, 2010
  • Like
  • 0
Is it possible to embed a Wave Dashboard in a custom Lightning Component? I know its possible through Lightning pages, but there are limitations there that have caused us to look into custom development. Such as tabs can only be added to Record and Home pages, but not an App (which is totally odd btw!). Ideally we would like to have a single page where users choose which dashboard they would like to view and do this by choosing the dashboard from a picklist or clicking a tab or something similar. So the page would only show one dashboard at a time based on which one they've chosen. 
Is there any possibility to **download the lightning components**?
Similar to an option to download apex class?
or Is there any IDE that supports Lightning Components?
Any option **deploy to other servers**(different salesforce accounts) ?

Thanks in advance.

Hi,

I have been hearing mixed opinions about what connected apps are used for in salesforce.com.Can anyone please clarify if connected apps can be used to prevent access to Salesforce.com api's for a particular user.

 

Our main use case is to 

Prevent selected list of users from using ANT migration tool,Data Loader.

 

 

Any idea or thoughts is very much useful to me .

 

Thanks,

Sid

  • February 13, 2013
  • Like
  • 0

Hello Board,

 

I am displaying Job records in pageblocktable using list. Every Job has Prority field (Text field). Say first Job has priority as 1, seocnd job as 2 and so on..

 

I am looking for a functionality where use can drag-drop job up and down and change the prority of each job.

What would be the best way to achive this? Has anyone done something like this?

 

Thanks,

Devendra

Hi,

 
I have some "System.debug" statement in my apex test class.. Where can I see the output of these statements in eclipse after executing the test class? I am aware of checkin in salesforce org thru debug logs. But I am not sure how to check in eclipse. Please help me on this.
 

Thanks,
Jbabu.

  • March 28, 2012
  • Like
  • 1

Hi All,

     Is there any way to get the index of picklist inside the validation rule????  I have a picklist having value a,b,c,d . So if i have selected c as picklist value next time when i update this record with picklist value as a,b it will through an error since this value is less in indexing(for example index of a is 1,b is 2 , c is 3 and d is 4). I can update the value of pickist which having greter than equal index value then existing.

I'm attempting to write my first Test Class for a Controller extension on a custome object.  Here is the extension code and the test class (in one file):

public class ItemEditController {

private ApexPages.StandardController controller {get; set;}
public Ad_Order__c[] searchResults {get;set;}
public string searchText {get;set;}

// standard controller - could also just use custom controller
public ItemEditController(ApexPages.StandardController controller) { }

// fired when the search button is clicked
public PageReference search() {
string searchFor = '%' + searchText + '%';
String qry = 'SELECT CreatedDate, CreatedById, Campaign_Name__c, Name, Flight_Start_Time__c, Flight_End_Time__c, Sales_Office__c,Status__c FROM Ad_Order__c' +
' where ((name LIKE :searchFor) OR (Campaign_Name__c LIKE :searchFor)) order by Status__c, name Limit 100';
searchResults = Database.query(qry);

return null;
}


public class Test_ItemEditController {

Ad_Order__c myOrder = new Ad_Order__c();
ApexPages.Standardcontroller con = new ApexPages.Standardcontroller(myOrder);

ItemEditController ext = new ItemEditController(con);
String mySearch= new String();

mySearch = 'Kathys';

ext.setSearchText(mySearch);
List<Account_Order__c> myList = new List<Account_Order__c>;
pageReference pr=new PageReference();
pr = ext.search();
myList=ext.searchResults;
if(myList.size <> 0){
System.debug('Search returned results');
}
}
}

 

However, I'm getting Save Error: unexpected token '=' on this line:   mySearch = 'Kathys'; whenever I save it.

 

Can anyone see what I'm doing wrong?

 

I apologize if this is a dumb question, but I've searched all over and don't understand what is wrong with my code.

I really appreciate any help you can offer.

 


 

Hi good people,

I have a visualforce page that displays a list of unresolved emails record.However,i would like each user to be able to view only his records i.e owner.name == user.name.Thus only view records that he/she owns.

Below is my visualforce page.

 

<apex:page controller="UnresolvedEmailsController" >
<apex:form >
  <apex:pageBlock title="Unresolved Emails" mode="edit">


 <apex:pageBlockTable value="{!unresolvedEmails}" var="Emails" >
 
                <apex:column >
                        <apex:facet name="header">Subject</apex:facet>
                        <apex:outputlink value="/{!Emails.id}">
                        <apex:outputField value="{!Emails.Name}"/>
                        </apex:outputlink>
                </apex:column>
                <apex:column >
                        <apex:facet name="header">From</apex:facet>
                        <apex:outputField value="{!Emails.From__c}"/>
                </apex:column>
                <apex:column >
                        <apex:facet name="header">Assigned To</apex:facet>
                        <apex:outputField value="{!Emails.Assigned_To__c}"/>
                </apex:column>
                <apex:column >
                        <apex:facet name="header">Owner</apex:facet>
                        <apex:outputField value="{!Emails.owner.name}"/>
                </apex:column>
                 <apex:column >
                        <apex:commandButton value="New Contact" action="{!newContact}" reRender="hiddenBlock">
                                               
                           <apex:param name="unresolvedEmailId"
                            value="{!Emails.id}"
                            assignTo="{!unresolvedEmailId}"/>
                        </apex:commandButton>
                        <apex:pageBlock id="hiddenBlock" rendered="false"></apex:pageBlock>               
                  </apex:column>
        </apex:pageBlockTable>
         
                  <apex:panelGrid columns="4" style="text-align: center; vertical-align: middle;">
                    <apex:commandLink action="{!first}">First</apex:commandlink>
                    <apex:commandLink action="{!previous}" rendered="{!hasPrevious}">Previous</apex:commandlink>
                    <apex:commandLink action="{!next}" rendered="{!hasNext}">Next</apex:commandlink>
                    <apex:commandLink action="{!last}">Last</apex:commandlink>
                </apex:panelGrid>
    </apex:pageBlock>
</apex:form>
</apex:page>

Hi,

I wanted to display the exceptions in a user friendly way on a visualforce page.

For example: the exception message i get is something similar to the one below

" xyzAfterInsert: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0 with id xxxxxxxxxxxxx; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, The Close Date of the Opportunity cannot be in the past. Please update it accordingly.: [] Class.xxxxx_UpdateOpportunity.updatexxxOpportunity: line 159, column 1 Trigger.xyzAfterInsert: line 29, column 1"

 

instead i want to display

"The Close Date of the Opportunity cannot be in the past. Please update it accordingly"

 

how can i do that ?

thanks,

sid 

  • March 26, 2012
  • Like
  • 0

i have to login into salesforce  org by an html page outside the salesforce....please giv some suggestion what to do for it ...n  i have to include below file

<script src="/soap/ajax/11.0/connection.js"></script>
<script src="/soap/ajax/11.0/apex.js"></script>

 should i have to download it ...? from where

i have a list which is showing unsaved records in a pageblock table, if i wish to retrieve those records for editing , how can i achieve it?

 

immediate reply will be appreciate...

thanks in advance.

I have this specific problem where I have two Objects 1) Keyword__c and 2) Account. They have master-detail relationship. Now I want to create a table where I want to display each value from Keyword__c in one column and count of Account for that from Master-detail relationship in other column. I tried something like below but I haven't been successful.

 

My Visualforce page has 

 

<apex:pageBlockTable title="Results" value="{!AllKeyword}" var="k">
<apex:column value="{!k.kw__c}" headerValue="Keywords" />
<apex:column headerValue="Count" value="{!KeywordCount}">
<apex:param name="kw" value="{!k.kw__c}"/>
</apex:column>
</apex:pageBlockTable>

  but it says 

 

Error: You may specify either a ''value'' attribute or a body for the column component, but not both	

  

and controller has 

 

public Integer getKeywordCount() {
  Integer cnt;
  String keyID;
  String kw = ApexPages.currentPage().getParameters().get('kw');  
   keyID = [Select Id from Keyword__c where kw__c = kw];  
   cnt = [Select count() FROM KeywordAccountAssociation__c Where Keyword__c = keyID];
  return cnt;
  }

 

but it says 

 

Error: companyDashboard Compile Error: unexpected token: 'kw'

 

Appreciate any help.

I am having problem with Ext js style:

 

I am redering the grid of Ext js on my visualforce page but visualforce page is overiding the styles of my grid.

 

but it works fine if i write:

<apex:page standardStylesheet="false" showHeader="false" sidebar="false">

</apex:page>

but this is not a solution for me i want header and sidebar both in my page.

 

Any other solution ?

 

how can i prevent overridng the styles issue?

 

 

Any kind of help will be greatly appriciated.

 

Thanks,

Vishal Thoriya.



Hi,

 

I am new to salesforce.com.

 

When I create a customer Account field with multi-select Picklist data type, can I have the values from a query of my account data? In this case, I want to show in the list of all accounts that match a specific Account Type.

 

Do I have to wrote some code to do this? I'd appreciate if someone can point me to some 101 course to learn how to do it.

 

-- vj

  • January 23, 2012
  • Like
  • 0