Sunday, November 3, 2013

Popup Reminders

Popup Reminders:
How to remind the users to add products for an opportunity .First create a rollup summary field that calculate how many products for an opportunity and then you can add a visualforce page with java script on your page layout like this

<apex:page standardController="Opportunity" rendered="{!Opportunity.Number_of_Products__c<1}">

<script type="text/javascript">
{

var r=confirm("please add opportunity ");
var i=0;
if (r==true&&i==0){
window.open('/p/opp/SelectSearch?addTo={!Opportunity.Id}&retURL=%2F{Opportunity.Id}','_top',false);
}else{
i=1;
}
}

</script>

</apex:page>




               


No comments:

Post a Comment