• vivekanandan
  • NEWBIE
  • 30 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 11
    Replies

We are using cookie class in the controller to enable to view the different sections of the same vf page. It was working for more than 3 months. All of a sudden it stops working and now it is failing.

When i check in the cookies of the browser , i am able to see the cookies name in the cookie list. But still the cookie method is failing and because of that we having the navigation issue in production.

 

 

Below is the cookie method:

 

 

PageReference pr = new PageReference('/apex/CustomerOverview_New?id='+account.Id+'&overview=1');
        Cookie cViewCookie = new Cookie('contactViewCookie',GECASConstants.ASSET_TYPE_AIRCRAFT,null,360000000,true);
        pr.setCookies(new Cookie[]{cViewCookie});
        pr.setRedirect(true);
        return pr;

Anyone can you please help me on this.

We have a requirement , when an opp record is updated , it should create a post in the Chatter groups. Also the entry in the groups shouldbe based on the opp record field value.(groups names are based on that).

 

IS there any way to get the opp record updates in chatter groups.

In our scenario, we have users assigned to different roles. We have delegation of tasks to other users with the help of look up to users. But we want to restrict only for a particular user, such that that user should not be delegated to a particular user.

 

Eg: There are 3 roles; Role1, Role2, Role3

 

Here Role1 should not be a delegate to only Role2. In the look up , it should check for  the current user role and then check for that particular role.

 

Is this possible using lookup filter. Please advice me on this.

We have a scenario where different vf page is assigned to different users.

Eg: page 1 is assigned to set of users

page 2 is assigned to set of users.

 

Basically both page 1 and page 2 belong to standard account object. When we open any account record based on the user login the page should be visible to the users.

 

There was a COOKBOOK code receipe but that was not working. It gives error as insufficinet privileges.

 

Please advice me on this asap.

In our application, we need to reassign the approval process. While reassigning the step, when we click on the look up it is showing all the list of available users in the application.

 

But i dont want to see all the users in the lookup. I want only a few users (based on specific profile) to be seen on the lookup.

 

Is there any way to filter the look up or any other way to hide the other users. I am using standard approval process.

I have two picklist fields in my application and when I edit the record those two field values getting changed to --None-- everytime.

 

When I save the record those two fields gets saved as none itself. Which is very big bug.

 

Please help me in this issue.

I installed sclipse in my system and when i try to create a new project from sandbox. It is showing error as Unable to fetch organisation details. I need to login to snadbox and move it to QA environment using eclipse.

 

Since change set is not enable in our application.

 

PLEASE HELP ME . THIS IS URGENT

We are using cookie class in the controller to enable to view the different sections of the same vf page. It was working for more than 3 months. All of a sudden it stops working and now it is failing.

When i check in the cookies of the browser , i am able to see the cookies name in the cookie list. But still the cookie method is failing and because of that we having the navigation issue in production.

 

 

Below is the cookie method:

 

 

PageReference pr = new PageReference('/apex/CustomerOverview_New?id='+account.Id+'&overview=1');
        Cookie cViewCookie = new Cookie('contactViewCookie',GECASConstants.ASSET_TYPE_AIRCRAFT,null,360000000,true);
        pr.setCookies(new Cookie[]{cViewCookie});
        pr.setRedirect(true);
        return pr;

Anyone can you please help me on this.

Hi,

 

I am trying to add the Notes and Attachments Section on my Visualforce Page and I keep getting the error as below:


'NotesAndAttachments' is not a valid child relationship name for entity Test Object

 

I used   <apex:relatedList subject="{!Test_Object__c}" list="NotesAndAttachments"/>

 

Can someone please suggest or point out my mistake.

 

Thanks!

In our scenario, we have users assigned to different roles. We have delegation of tasks to other users with the help of look up to users. But we want to restrict only for a particular user, such that that user should not be delegated to a particular user.

 

Eg: There are 3 roles; Role1, Role2, Role3

 

Here Role1 should not be a delegate to only Role2. In the look up , it should check for  the current user role and then check for that particular role.

 

Is this possible using lookup filter. Please advice me on this.

Hey all,

 

I have the following chunk of code in a complex VF page:

<apex:dataTable value="{!oi1PricePlans}" width="100%" var="oi1pp" id="oi1pp" rendered="{!renderOi1}">
	<apex:column width="25" styleClass="optionHeight">
		<apex:inputCheckbox id="selectPP1" onclick="deselectOtherOi1(this);calculatePhoneCostOi1({!oi1pp.price}, '{!myOrderItem1.Hardware_Product__r.Name}', '{!oi1pp.smeProductPrice.Price_Plan__r.Name}');calculateMonthlyCostOi1(this,'',{!oi1pp.monthlyCharge},'P');" value="{!oi1pp.selected}">
			<apex:actionSupport event="onchange" action="{!setExtrasAddOnsByPPOI1}" rerender="add_ons_1,extras_1,insurance_1"/>
		</apex:inputCheckbox>
	</apex:column>
	<apex:column styleClass="btext_2">
		{!oi1pp.smeProductPrice.Price_Plan__r.Name}&nbsp;
			<apex:commandLink action="{!setPricePlanDetailsTable}" value="(?)" id="theCommandLink" rel="tooltip" rerender="details" oncomplete="showDetailsDialogPP();" styleClass="see_m_link2" style="font-weight:700;">
				<apex:param assignTo="{!pricePlanId}" value="{!oi1pp.smeProductPrice.Price_Plan__r.id}" name="price_plan_id" />
			</apex:commandLink>
	</apex:column>
	<apex:column width="76" styleClass="b_normal"><strong>€{!oi1pp.monthlyCharge}</strong></apex:column>
</apex:dataTable>

 The object for the data table is a wrapper class, basically consisting of a checkbox, name, price.

 

The desired functionality (which correctly works in IE9 and FF10) is that on selecting one of the checkboxes, the javascript functions should be called using the onclick and then the onchange in the actionsupport rerenders outputpanels that follow the datatable.

 

What happens in IE 8 is that the javascript functions are called on the onclick, but the onchange in the actionsupport doesn't fire until the user has clicked somewhere else on the screen (say a blank area).

 

How can we fix this so it works in IE8? I've tried changing the onchange to onclick and onblur but that doesn't work (the javascript functions failto run properly).

 

Any ideas?

All I want to do is close the popup window and refresh the parent when my save is complete and nothing happens on this.  Can anyone help?

 

Page

<apex:page id="orderpage1" standardController="Order_Item_Junction__c" extensions="oitemController" sidebar="false" showheader="false" >
<script language="JavaScript" type="text/javascript">
function closeAndRefresh()
{
    window.close();
    window.opener.location.reload();
}
</script>
    <apex:form id="form1">
        <apex:pageBlock title="Add Order Items" id="order">
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="Save" action="{!saveitems}" oncomplete="CloseAndRefresh()" />
                <apex:commandButton value="Cancel" action="CloseAndRefresh()" />
            </apex:pageBlockButtons>
                <apex:pageBlockSection id="pbsbundle" title="Available Product Bundles" rendered="true" columns="1">
                    <apex:pageBlockTable id="pbtbundles" value="{!lstoitem}" var="l" width="100%">
                        <apex:column headerValue="Order" value="{!l.Order__c}" width="40%"/>
                        <apex:column headervalue="Product Bundle Name" value="{!l.Product_Bundle__c}" width="40%"/>
                        <apex:column headerValue="Quantity" id="iqty" width="20%">
                            <apex:inputField value="{!l.Quantity__c}"/>
                        </apex:column>
                    </apex:pageBlockTable>
                </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!saveitems}" oncomplete="CloseAndRefresh()" />
                <apex:commandButton value="Cancel" action="CloseAndRefresh()" />
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

  • January 14, 2012
  • Like
  • 0

Hi

 

I have the following query in my code

 

list<npo02__Household__c> DeleteHouseholds=[select Id from npo02__Household__c where Id NOT IN :TranHouseHoldIdSet];

 

 

     if(!DeleteHouseholds.isEmpty()&& xmlvalue[0].Households__c == true){
      delete DeleteHouseholds;
      }

 

 

But one of my client has 12000 dummy households which satisfies the above query.. But there is a limit of 10000 dml rows. So he is getting too many dml rows :10001 exception..

 

I know I can put a limit, but I want to delete all at a time..

 

Can any of you advice me please

 

Thanks

Anu

Hi,

I have a requirement where I have to display one VF page as an iframe in another VF page. Both the VF pages are sharing the same controller. From first VF page, on a click event I will query some records in the controller and those records should be displayed in the iframe which is the second VF page. So, in the iframe, how can I refer the page? If I refer like {!$page.secondPage}, the controller class variables used in this VF is coming as null. Can anyone tell me how should I refer the second page in the iframe with maintaining the controller class variables?

 

 

 

Thanks,

sorna

  • August 27, 2010
  • Like
  • 0

Hope everyone is doing well.  Had two quick questions about chatter that I could use some help with.

 

1.  How do I customize the chatter name from the drop down menu in the top right of the screen.  For instance instead of salesforce chatter, I would like it to say "my company: chatter? 

 

2.  I cant get the salesforce chatter link to show up for my users.  Admins can do it but when they go to that menu, all they have is sales, call center, etc.  Any ideas?

 

I appreciate the help

After a lot of persistence I finally was able to get repeating header and footers when rendering a Visualforce page as a PDF. The key to this is the page2PDF support of CSS3. 

 

Here is the css I came up with:

 

<style type="text/css">

@page {

@top-center {

content: element(header);

}

}

div.header {

padding: 10px;

position: running(header);

}

</style>

 

In the visualforce page I have the header setup as a div with the class name "header" the position running command pulls the content in my div and repeats it at the top of every page. The key for some reason is to put your header and footer divs at the top before you put your content on the page.

 

Here is my page

 

<apex:page renderAs="pdf">

<head>

<style type="text/css" media="print">

@page {

@top-center {

content: element(header);

}

@bottom-left {

  content: element(footer);

}

}

 

div.header {

padding: 10px;

position: running(header);

}

div.footer {

display: block;

padding: 5px;

position: running(footer);

}

 

.pagenumber:before {

content: counter(page);

}

.pagecount:before {

content: counter(pages);

}

</style>

</head>

 

<div class="header">

<div>My Header Text</div>

</div>

 

<div class="footer">

<div>Page <span class="pagenumber"/> of <span class="pagecount"/></div>

</div>

 

<div class="content">

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec nulla turpis. Suspendisse eget risus sit amet lectus ornare varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean nec urna purus, adipiscing accumsan massa. Nullam in justo nulla, sed placerat mauris. In ut nunc eget libero posuere luctus. Donec vulputate sollicitudin ultrices. Nulla facilisi. Mauris in sapien arcu. Phasellus sit amet quam non mi ornare tincidunt ac quis lectus.</p>

</div>

</apex:page>

 

I cut the content text short for the purpose of this post. I am sure it will just take some more playing around.

 

Hope this helps someone avoid some late nights like I spent trying to figure this out. :smileyhappy:

 

 

Message Edited by JohnDS on 03-10-2010 07:34 PM

Hello exports, I have a code where i have used "oncomplete" event of apex commandbutton and i have called javascript function on that button's oncomplete event.

Even that command button has standard action mathod "Save" as its action.

 

Here is my code:

 

<apex:page StandardController="CertificationList__c" showHeader="false" sideBar="false" id="pgOnlDept"> <style> .labelcol{color:Purple;font-size:9pt;font-weight:Bold;} </style> <apex:form id="frmOnlDept"> <apex:pageBlock id="pbOnlDept"> <apex:pageBlockButtons > <apex:commandButton id="btnSave" action="{!save}" value="Save" oncomplete="back();"/> <apex:commandButton id="btnCancel" action="{!Cancel}" value="Cancel" oncomplete="window.location.reload();"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Information" id="pbsOnlDept"> <apex:inputField value="{!CertificationList__c.CertificationType__c}" id="flg" styleClass="labelcol"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <script type="text/javascript"> function back() { window.parent.location.href='{!$Page.CertificateLookup1}?rid={!$CurrentPageReference.parameters.rid}&txt={!$CurrentPageReference.parameters.txt}'; } </script> </apex:page>

this code was working perfectly before few days.

 

What could be the reason??

 

Please guide me

 

Thanks in advance.

 

 

Shwetal Desai

I've got a custom object that I want to have rooted on a tab that uses one of my Visualforce pages.

On Setup > Build > Tabs, if I built a "Visualforce Tab", the tab shows up and works but is never highlighted, so it looks like it's not selected even when it is.  Maybe there's some magic "tabStyle" value that I can use to force my visualforce tab to highlight, but I have no idea what it is.

Alternately, in Setup > Build > Tabs I can create a "Custom Object Tab", which highlights perfectly.  However, by default it shows the standard list view rather than my desired Visualforce page.

This seems to be exactly what the "Standard buttons and links" "override" function is for.

So I go to Setup > Build > Objects, select my custom object, and "override" the standard "Tab". I point that override at my desired Visualforce page (using the "page" radio button and then choosing via the drop-down).

Now when I click on my custom object tab, I get an error message ("URL No Longer Exists").

So, basically, if you have a custom object tab & then override the tab location using a Visualforce page, it doesn't work.  I think this is one of two use cases of the "override" function for tabs (the other being an s-control), so this seems to be a bug.
  • February 08, 2008
  • Like
  • 0