• Arun Bala
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 51
    Replies

Folks,

I have a requirement where I need to show only certain object names on the 'Related to' picklist on the task creation screen. Hence I am trying to figure out a way to disable 'Track Activities' check box on standard objects just as we do on any custom object.But no luck so far. Not even sure if its possible. Any advice on how to implement this ?

 

Thanks in advance.I would truly appreciate your inputs.

 

 

Regards,

A B

Folks,

Looks like we can only bind a String variable to a multi select column.

 

I have a situation where I need to pass a set of string to the SOQL:

for e.g: Select a.Id,a.OwnerId from Account a
where a.Lead_Rating__c includes ('B','C') 

 

Now when I try to construct  the parameter and pass it dynamically, say for e.g:

String a = '\'B\'';
String b = '\'C\'';
leadRatingStr = a+','+b;

 

and do :

Select a.Id,a.OwnerId from Account a
where a.Lead_Rating__c includes (:leadRatingStr) 

 

It doesnt work ... returns 0 rows where as the 1st query returned rows as expected. !! I simply dont understand. Any clue folks ?

 

 

 

Thanks

Hello folks,

I am facing a weird issue. I have a parent window from which I open a popup onclick of a button. And inside the pop up window, I have some links and on click of a link, I need to refresh my parent window with some data.

 

I did some coding like the below on the popup:

 

window.opener.document.getElementById('parent:form1:id1').value= 'test';

 

It works fine on all browsers in one machine but doesnt work in other machines(window.opener comesup as null). Infact we have same versions of browsers on all the machines.

 

Has anyone faced something like this before ? Any inputs would be greatly appreciated folks.

 

 

Thanks

Message Edited by Arun Bala on 02-18-2009 07:25 AM

Folks,

Probably a dumb question -- is it a bad practise to use 1 controller for 2 different visualforce pages ? 1 page is a main page & the other is a pop-up from the main page.

 

Pls advise.

 

Thanks.

Folks,

I have a decimal which I need to display with thousands separator on a visualforce page. An outputText displays that value.

 

E.g: now it is 5360. I wanted it to be displayed as : 5,360

 

Any suggestions or ideas on how can I convert the decimal to the currency format ?? unforunately, I cannot use the exact sObject field as I am using a wrapper class.

 

 

Thanks folks.

Folks,
I am in the process of migrating the visualforce pages from my DEV to other environments. In my VF page, I am referring to certain fields that are managed custom object fields. The actual field definition with the namespace prefix is : apPack__Account_c but in the VF page when I bind a inputField to the apPack__Account_c, upon compilation the code removes the prefix and makes it Account_c and hence the migration to other environments (without the namespace prefix) fail as expected.

This is already creating some butterflies in my stomach :-( ...


Anyone has a thought about this ?


Thanks.


Message Edited by Arun Bala on 12-31-2008 11:26 AM
Folks,
Have anyone ever tried to use the oncomplete attribute on a command button ? I am facing one weird issue.

<apex:commandButton styleClass="btn" value="Save" action="{!saveAction}" id="save" oncomplete="checkError();"/>

Now on click of the button when the save action fails as a result of some required fields not filled in, the fields are not getting highlighted as they would typically. When I remove the oncomplete definition, they get highlighted. My
gut feeling is that our own definition of oncomplete overrides something that salesforce has defined for commandButton on completion of an ajax request. Any takers ??


Thanks.


Message Edited by Arun Bala on 12-30-2008 08:14 PM
Folks,
In ANT scripts, is there a way to define the list of profiles that are entitled to access the contents of a particular VF page or an apex class. In other words what I refer to here is the security definition(enabled profiles) for each VF page or apex class.

Any hints would be helpful.


Thanks.
I have a pageBlockTable:

                        <apex:pageBlockTable value="{!dataTabTasks}" var="task" cellspacing="4" id="taskTable" style="bPageBlock">
                            <apex:column id="hideDiv1">
                                <apex:facet name="header">Action</apex:facet>
                                   <apex:CommandLink styleClass="addNL" immediate="true" onclick="delTask('{!task.Id}','{!$Component.theHiddenInput}','{!$Component.theHiddenInput1}','{!task.CallDisposition}');" value="Del" action="{!removeTask}" reRender="out"/> |

                                  onclick="toggleFieldEdit('{!$Component.pg1}','{!$Component.pg2}');" id="img1"/></a>
                                </div>
                           </apex:column>
                               <apex:column >                  
                                <apex:facet name="header">Task Subject</apex:facet>
                                <apex:inputField id="subject" value="{!task.subject}" required="true" style="width: 70px;"/>
                            </apex:column>

Before printing the page, I wanted to hide the column (hideDiv1) in the JS ... while I set the style hideDiv1.display = 'none', the header (facet in this case) is not getting hidden. The header is still being displayed. Any possible work around folks ?

I didnt want to make a Ajax function call and then set render="false" for column 1. I need to do this in JS itself. Any inputs would be helpful.

Thanks.



Message Edited by Arun Bala on 12-25-2008 03:26 PM
Hello folks,
Today  I am challenged with this problem .. I have my page's showHeader attribute set to true as I wanted to display the sideBar & the header .. at the same time, while printing the page using JS window.print(), my side bar and the header also get printed .. but I wanted only the VF tab(page) to be printed.

Any hints folks ? your help with be greatly appreciated !


Thanks
A B


Message Edited by Arun Bala on 12-23-2008 10:40 AM
Hello Folks,
I also visited previous posts in the forum on this issue, it didnt help much so far. The outputPanel is not getting reRendered when the actionSupport executes a function. This happens esp. when I define the immediate="true".

Any hints folks ?


Thanks
Hello folks,
Is there a defined approach or a way to integrate salesforce with mainframes systems ?? Any hints or directions will be helpful.



Thanks,
Arun



Hello folks,
Can someone advise me as to how we can get the return URL of a page in a visualforce controller ? My assumption is that it is not possible for VF controller to know from which page it was invoked. So , in order to pass the retURL as a URL parameter(yes, I am calling the visualforce page using a s-control URL), how can I retrieve the same. For e.g.: if I am on a Accounts List page, how do I retrieve its URL ?  [on click of a custom button on the Accounts List page, I invoke the VF page using JS NavigateToURL).

Any help would be greatly appreciated !


Thanks,
A B


Message Edited by Arun Bala on 12-10-2008 01:47 PM

Message Edited by Arun Bala on 12-10-2008 01:48 PM
Folks,
I am developing a VF page, where I render a task list on a pageBlockTable. Now on the pageBlockTable, apart from the standard task fields, I also have a field called 'Day' that will display the english day of the activityDate (like Thu or Fri or..) .. Below is my current code:

                    <apex:pageBlockTable value="{!dataTabTasks}" var="task" cellspacing="4" id="taskTable">
                        <apex:column >
                            <apex:facet name="header">Action</apex:facet>
                               <a href="#" onclick="delTask('{!task.Id}','{!$Component.theHiddenInput}');"><b>Del</b></a>
                       </apex:column>
                        <apex:column >
                            <apex:facet name="header">Comment</apex:facet>
                            <a href="#"> <apex:image url="{!$Resource.addComment_img}" styleClass="toggleArrow toggleArrowCollapsedEmpty;" alt="Expand" title="Expand"
                              onclick="toggleFieldEdit('{!$Component.pg1}','{!$Component.pg2}');"/></a>
                       </apex:column>
                       <apex:column >                  
                            <apex:facet name="header">Task Subject</apex:facet>
                            <apex:inputfield id="subject" value="{!task.subject}" required="true" style="width: 110px;"/>
                            <apex:panelGrid columns="1" id="pg1" style="display: none;">
                                <apex:facet name="header"><b>Comments</b></apex:facet>
                                <apex:inputText id="description" value="{!task.description}" maxlength="2000" style="width: 160px; height: 40px;word-wrap: break-word "/>
                            </apex:panelGrid>
                        </apex:column>
                        <apex:column >
                            <apex:facet name="header">Day</apex:facet>
                            <apex:outputText id="day_id" style="width: 40px;font-weight: bold;" value="{??}"/>
                        </apex:column>
                        <apex:column >
                            <apex:facet name="header">Due Date</apex:facet>
                            <apex:inputfield id="activityDate" value="{!task.activityDate}" />        
                        </apex:column>
                        <apex:column >
                            <apex:facet name="header">Assigned To</apex:facet>
                            <apex:inputfield id="ownerid" value="{!task.ownerid}" style="width: 110px;"/>
                            <apex:panelGrid columns="2" id="pg2" style="display: none;">
                                <apex:facet name="header"><b>Reminder</b></apex:facet>
                                <apex:inputfield id="reminderChkBox_id" value="{!task.IsReminderSet}"/>
                                <apex:inputfield id="reminder" value="{!task.ReminderDateTime}" style="width: 110px;"/>
                             </apex:panelGrid>
                        </apex:column>
                        <apex:column >
                            <apex:facet name="header">Type</apex:facet>
                            <apex:inputfield id="type" value="{!task.type}" style="width: 110px;"/>
                        </apex:column>
                        <apex:column >
                            <apex:facet name="header">Priority</apex:facet>
                            <apex:inputfield id="priority" value="{!task.priority}" required="false" style="width: 110px;"/>
                        </apex:column>
                        <apex:column >
                            <apex:facet name="header">Status</apex:facet>
                            <apex:inputfield id="status" value="{!task.status}" required="false" style="width: 110px;"/>
                        </apex:column>                   
                    </apex:pageBlockTable>

My problem is with the line highlighted in Red.<apex:outputText id="day_id" style="width: 40px;font-weight: bold;" value="{??}"/>; Now is there a way to load the 'day' of the activity based on the activityDate when the pageBlockTable is rendered.  day is not part of the standard Task Object fields and hence we need to calculate it manually. But not sure when / how / where to do this calculation.

Your help will be highly appreciated !!
Hello folks,
I am facing a million dollar issue in one of my flex - salesforce mashups based applications.

I need to figure out a way to dynamically construct a array collection(dataprovider for my datagrid) by parsing the QueryResult object.  I was doing something like this ..

                var acRetVal:ArrayCollection = new ArrayCollection();
                for (var j:int=0;j<qr.result.length;j++) {
                    try
                    {
                     acRetVal.addItem({Email:qr.records[j].Email, Name:qr.records[j].Name,Role:qr.records[j].UserRole.Name});
                     }

But I need to do this dynamically so that I can use the same arrayCollection object for any queryExecution.

My problem now is:  I dont know how to retrieve the value for qr.records[j].UserRole.Name.  dynamically since it contains a relationship result, if I give something like

var colName:String = 'UserRole.Name'.
var role:String = qr.records[j].ColName. === > this statement doesnt work. but if I give UserRole.Name, it works.

Any hints on how to overcome this issue ? Help pls ?


Thanks folks,
Arun

Hi folks ,
I am in a position to pass in a 'List' as a parameter value to the controller (during an ajax (JS function call)) from the visualforce page ... can someone give me hints on how to accomplish this, if this is possible.


Thanks,
A B


Message Edited by Arun Bala on 11-17-2008 11:52 PM

Folks,

I have a tricky situation at hand ...

 

I need to configure my settings on my org. in such a way that :

 

1. A task related to an account (ACC A) and assigned to a user(say user A) can be edited by anyother user(say user B) who has Read-write access to that account(ACC A). Here users A & B are on the same role(not part of any role hierarchy). Rightnow user B gets an error message 'Insufficient privilege' if he tries to edit the task created using above step.

 

I am confused as to how we can make this work using sharing rules. My current sharing setting for Activities object is 'Controlled by Parent'. Most importantly I have set off the 'Modify All Data' option on user B's profile as I cannot allow user B to edit data on all objects. And if I set on 'Modify All Data' to true, it works. But my business req. doesn't support that.

 

Anyone faced with this kind of requirement earlier ? Your advise would be greatly appreciated.

 

 

Thanks,

Arun B

  • June 09, 2009
  • Like
  • 0

Folks,

I have a requirement where I need to show only certain object names on the 'Related to' picklist on the task creation screen. Hence I am trying to figure out a way to disable 'Track Activities' check box on standard objects just as we do on any custom object.But no luck so far. Not even sure if its possible. Any advice on how to implement this ?

 

Thanks in advance.I would truly appreciate your inputs.

 

 

Regards,

A B

Hello folks,

I am facing a werid issue .. not sure if this is a limitation of Visualforce.

 

I wanted to change the font color of the header to my pageBlockTable. I used a CSS class and assigned it to the headerClass on the apex:column inside the pageBlockTable.

 

<style>
        .headerStyle{background-color:#638658;color:#FFFFFF}
</style>

 

<apex:pageBlockTable value="{!acc}">

  <apex:column headerValue="{!accTitle}" headerClass="headerStyle">

     <apex:outputLink value="/{!acc.account.Id}" target="_blank" styleClass="{!acc.style}">      

      {!acc.account.Name}

     </apex:outputLink>
  </apex:column>

</ apex:pageBlockTable>

 

 

The  background color of the header is getting applied but not the font color. But If I use a data table instead of a pageBlockTable,the font color gets applied. But I need to use pageBlockTable for business reasons.

 

Is this a limitation ? Any hints would be greatly appreciated !

 

 

 

 

Thanks.

  • March 03, 2009
  • Like
  • 0

Folks,

Looks like we can only bind a String variable to a multi select column.

 

I have a situation where I need to pass a set of string to the SOQL:

for e.g: Select a.Id,a.OwnerId from Account a
where a.Lead_Rating__c includes ('B','C') 

 

Now when I try to construct  the parameter and pass it dynamically, say for e.g:

String a = '\'B\'';
String b = '\'C\'';
leadRatingStr = a+','+b;

 

and do :

Select a.Id,a.OwnerId from Account a
where a.Lead_Rating__c includes (:leadRatingStr) 

 

It doesnt work ... returns 0 rows where as the 1st query returned rows as expected. !! I simply dont understand. Any clue folks ?

 

 

 

Thanks

Hello folks,

I am facing a weird issue. I have a parent window from which I open a popup onclick of a button. And inside the pop up window, I have some links and on click of a link, I need to refresh my parent window with some data.

 

I did some coding like the below on the popup:

 

window.opener.document.getElementById('parent:form1:id1').value= 'test';

 

It works fine on all browsers in one machine but doesnt work in other machines(window.opener comesup as null). Infact we have same versions of browsers on all the machines.

 

Has anyone faced something like this before ? Any inputs would be greatly appreciated folks.

 

 

Thanks

Message Edited by Arun Bala on 02-18-2009 07:25 AM

Hi,

 

I'm attempting to bind a String into a SOQL query.

 

I get the following Error. expecting a left parentheses, found ':' (The line number refers to the SOQL query)

 

Any thoughts?

 

Thanks 

 

 

public List<Contact> getPeople_In_Category(){ String Category_selected_str = "Translator"; people_list = [select c.id, c.name, c.phone, c.mobilePhone, c.email, c.title, c.account.name FROM Contact c WHERE c.Category__c INCLUDES :Category_selected_str LIMIT 100]; return people_list;

}

 

 

 

Folks,

Probably a dumb question -- is it a bad practise to use 1 controller for 2 different visualforce pages ? 1 page is a main page & the other is a pop-up from the main page.

 

Pls advise.

 

Thanks.

Folks,

I have a decimal which I need to display with thousands separator on a visualforce page. An outputText displays that value.

 

E.g: now it is 5360. I wanted it to be displayed as : 5,360

 

Any suggestions or ideas on how can I convert the decimal to the currency format ?? unforunately, I cannot use the exact sObject field as I am using a wrapper class.

 

 

Thanks folks.

Hello folks,

I have a requirement to word-wrap and display the column header names of a pageBlockTable. Any idea how to achieve this ? Thanks.

 

 

 

  • February 03, 2009
  • Like
  • 0
Folks,
I am in the process of migrating the visualforce pages from my DEV to other environments. In my VF page, I am referring to certain fields that are managed custom object fields. The actual field definition with the namespace prefix is : apPack__Account_c but in the VF page when I bind a inputField to the apPack__Account_c, upon compilation the code removes the prefix and makes it Account_c and hence the migration to other environments (without the namespace prefix) fail as expected.

This is already creating some butterflies in my stomach :-( ...


Anyone has a thought about this ?


Thanks.


Message Edited by Arun Bala on 12-31-2008 11:26 AM
What is the correct endpoint and server URL to use to access the sandbox thru the APEX Explorer?