• Ravisankar
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
hi
I want to send an automated email  to case Owner when the case Status field is not modified for certain period of time?

Could you please suggest the best way to achieve this?

Thanks
Ravi

Hi

 

I built a Visualforce page for Account object having Auto complete functionality.

 

I am not able to save the record since am not able to read the html search field(used for account name)..  below is the visualforce page and controller..

<apex:page title="New Account" standardController="Account" extensions="Accounteditpage1" tabStyle="Account" id="pgId">
<apex:includeScript value="{!URLFOR($Resource.jQuery_UI_1_10_3, 'js/jquery-1.9.1.js')}"/> 
    <script src="/soap/ajax/26.0/connection.js" type="text/javascript"></script>
    <apex:includeScript value="{!URLFOR($Resource.jQuery_UI_1_10_3, 'js/jquery-ui-1.10.3.custom.js')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.jQuery_UI_1_10_3, 'css/ui-lightness/jquery-ui-1.10.3.custom.css')}"/>
    
<apex:sectionHeader id="mainHeader" title="New Account"/>
<style type="text/css">
span.reqField{
    background-color:#CC0000;
    margin: 3px; 0px; 0px; 0px; 
    padding-top: 0px;  
    padding-right: 0px;  
    padding-bottom: 0px; 
    padding-left: 0px; 
}
</style>
<apex:detail />
<apex:form id="f" >
    
    <apex:pageMessages id="info"></apex:pageMessages>
    <apex:pageBlock id="AccountDetailBlock" title="Account Edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" onclick="setHidden();" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
                <apex:commandButton value="Save & New"/>
            </apex:pageBlockButtons>    
     
            <apex:pageBlockSection title="Account Information">  
            <apex:pageblockSectionItem >

                <b>Account Name(Display list of accounts)</b><input type="text" id="sfjscontactautocomplete"/> 
                <apex:inputHidden id="hdnRep2" value="{!sfjscontactautocomplete}"/> 
                    </apex:pageblockSectionItem>                                             
                <apex:repeat value="{!$ObjectType.Account.FieldSets.GVAccountinformation}" var="f">  
                
                <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                </apex:repeat>
            </apex:pageBlockSection>
               <apex:pageBlockSection title="Address Information">
                
                <apex:repeat value="{!$ObjectType.Account.FieldSets.GVaddressinformation}" var="f">  
                <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                </apex:repeat>
            
            
               </apex:pageBlockSection>
                             
                <apex:pageBlockSection title="Additional Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVadditionalinformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>
                <apex:pageBlockSection title="Financial Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVfinancialinformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>
                <apex:pageBlockSection title="Spend &amp; Competitor Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVSpend_ampCompetitorInformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>   
                <apex:pageBlockSection title="Virads Integration Status">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVViradsIntegrationStatus}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>  
                <apex:pageBlockSection title="System Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVsysteminformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>                 
                                                                  
            
     </apex:pageBlock>
    
</apex:form>
<script>
        var j = jQuery.noConflict();      
        //We will establish a connection salesforce database using the sforce.connection.init(sessionID, ServerURL) function.
        var sid = '{!$Api.Session_ID}';
        var server = "https://" + window.location.host + "/services/Soap/u/26.0";
        sforce.connection.init(sid, server);
         
        //We will query the Account object using the sforce.connection.query function. This will return 200 results.
        var result = sforce.connection.query("select Name from Account");
        var records = result.getArray("records");
        var javascriptAccountList =[];
         
        //Iterate thru the list of Accountand store them in a javascript simple array variable which will then assign it to the source of the autocomplete.
        for(i=0;i<records.length;i++){
            javascriptAccountList[i]=records[i].Name;
        }
        //on Document ready
        j(document).ready(function(){
             
                j("#sfjscontactautocomplete").autocomplete({
                source : javascriptAccountList
            });
        });
        
        function setHidden()
    {
        var hiddenRep = document.getElementById('pgId:f:AccountDetailBlock:hdnRep2');
        hiddenRep.value = document.getElementById('sfjscontactautocomplete').value;
    }
    </script>
</apex:page>

 

public with sharing class Accounteditpage1 {
Account Acc;
    public Accounteditpage1(ApexPages.StandardController controller) {

    }
    public String sfjscontactautocomplete{get;set;}
    public pagereference save(){
    
     new account().addError('*****'+ sfjscontactautocomplete);

return null;

}

}

 I am getting an error message which I used in the controller. please help me with this.

hi
I want to send an automated email  to case Owner when the case Status field is not modified for certain period of time?

Could you please suggest the best way to achieve this?

Thanks
Ravi

Hi

 

I built a Visualforce page for Account object having Auto complete functionality.

 

I am not able to save the record since am not able to read the html search field(used for account name)..  below is the visualforce page and controller..

<apex:page title="New Account" standardController="Account" extensions="Accounteditpage1" tabStyle="Account" id="pgId">
<apex:includeScript value="{!URLFOR($Resource.jQuery_UI_1_10_3, 'js/jquery-1.9.1.js')}"/> 
    <script src="/soap/ajax/26.0/connection.js" type="text/javascript"></script>
    <apex:includeScript value="{!URLFOR($Resource.jQuery_UI_1_10_3, 'js/jquery-ui-1.10.3.custom.js')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.jQuery_UI_1_10_3, 'css/ui-lightness/jquery-ui-1.10.3.custom.css')}"/>
    
<apex:sectionHeader id="mainHeader" title="New Account"/>
<style type="text/css">
span.reqField{
    background-color:#CC0000;
    margin: 3px; 0px; 0px; 0px; 
    padding-top: 0px;  
    padding-right: 0px;  
    padding-bottom: 0px; 
    padding-left: 0px; 
}
</style>
<apex:detail />
<apex:form id="f" >
    
    <apex:pageMessages id="info"></apex:pageMessages>
    <apex:pageBlock id="AccountDetailBlock" title="Account Edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" onclick="setHidden();" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
                <apex:commandButton value="Save & New"/>
            </apex:pageBlockButtons>    
     
            <apex:pageBlockSection title="Account Information">  
            <apex:pageblockSectionItem >

                <b>Account Name(Display list of accounts)</b><input type="text" id="sfjscontactautocomplete"/> 
                <apex:inputHidden id="hdnRep2" value="{!sfjscontactautocomplete}"/> 
                    </apex:pageblockSectionItem>                                             
                <apex:repeat value="{!$ObjectType.Account.FieldSets.GVAccountinformation}" var="f">  
                
                <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                </apex:repeat>
            </apex:pageBlockSection>
               <apex:pageBlockSection title="Address Information">
                
                <apex:repeat value="{!$ObjectType.Account.FieldSets.GVaddressinformation}" var="f">  
                <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                </apex:repeat>
            
            
               </apex:pageBlockSection>
                             
                <apex:pageBlockSection title="Additional Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVadditionalinformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>
                <apex:pageBlockSection title="Financial Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVfinancialinformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>
                <apex:pageBlockSection title="Spend &amp; Competitor Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVSpend_ampCompetitorInformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>   
                <apex:pageBlockSection title="Virads Integration Status">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVViradsIntegrationStatus}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>  
                <apex:pageBlockSection title="System Information">
                
                        <apex:repeat value="{!$ObjectType.Account.FieldSets.GVsysteminformation}" var="f">  
                        <apex:inputfield value="{!Account[f]}" required="{!OR(f.required, f.dbrequired)}"/>  
                        </apex:repeat>
            
            
               </apex:pageBlockSection>                 
                                                                  
            
     </apex:pageBlock>
    
</apex:form>
<script>
        var j = jQuery.noConflict();      
        //We will establish a connection salesforce database using the sforce.connection.init(sessionID, ServerURL) function.
        var sid = '{!$Api.Session_ID}';
        var server = "https://" + window.location.host + "/services/Soap/u/26.0";
        sforce.connection.init(sid, server);
         
        //We will query the Account object using the sforce.connection.query function. This will return 200 results.
        var result = sforce.connection.query("select Name from Account");
        var records = result.getArray("records");
        var javascriptAccountList =[];
         
        //Iterate thru the list of Accountand store them in a javascript simple array variable which will then assign it to the source of the autocomplete.
        for(i=0;i<records.length;i++){
            javascriptAccountList[i]=records[i].Name;
        }
        //on Document ready
        j(document).ready(function(){
             
                j("#sfjscontactautocomplete").autocomplete({
                source : javascriptAccountList
            });
        });
        
        function setHidden()
    {
        var hiddenRep = document.getElementById('pgId:f:AccountDetailBlock:hdnRep2');
        hiddenRep.value = document.getElementById('sfjscontactautocomplete').value;
    }
    </script>
</apex:page>

 

public with sharing class Accounteditpage1 {
Account Acc;
    public Accounteditpage1(ApexPages.StandardController controller) {

    }
    public String sfjscontactautocomplete{get;set;}
    public pagereference save(){
    
     new account().addError('*****'+ sfjscontactautocomplete);

return null;

}

}

 I am getting an error message which I used in the controller. please help me with this.