• sundhar.mks1.3962649227519546E12
  • NEWBIE
  • 165 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 69
    Questions
  • 67
    Replies
Hi,

I have tried the design look like Link: http://demos.jquerymobile.com/1.3.2/ to VF page, but css,jquery styles are not suported and. how to use the jquery properly in vf page. kindly refer the following code

VF page
============
<apex:page showheader="false" sidebar="false">
 <apex:form >  
        
   <apex:includeScript value="{!URLFOR($Resource.jqerymobile, '/js/jquery-1.4.5.min.js')}" />
    <apex:includeScript value="{!URLFOR($Resource.jqerymobile, '/js/jquery.mobile-1.4.5.min.js')}" />
    <apex:includeScript value="{!URLFOR($Resource.jqerymobile, '/js/jquery.mobile-1.4.5.js')}" />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.external-png-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.external-png-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.icons-1.4.5custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.icons-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-png-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-png-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-svg-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-svg-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.structure-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.structure-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.theme-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.theme-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery-ui-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile-1.4.5.mincustom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery-ui-1.4.5.custom.css')}"  /> 
    
    <apex:tabPanel >
        <apex:tab label="Button">.
                    <div data-role="collapsible-set" data-theme="c" data-content-theme="d">
                
                <input type="Button" value="Anchor"/><br/>
                <br/>
                <input type="Button" value="Input"/><br/>
                <br/>
                <input type="Button" value="Submit"/><br/>
                <br/>
                <input type="Button" value="Reset"/><br/>
                <br/>
                <input type="Button" value="Dropdown"/><br/>
             
        </div><br/><br/>
     
        </apex:tab>
    </apex:tabPanel>
    
     <apex:tabPanel >
        <apex:tab label="Grid">
               <div class="ui-grid-a">
                    <div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">Block A</div></div>
                    <div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">Block B</div></div>
               </div>
               <fieldset class="ui-grid-a">
                    <div class="ui-block-a"><button type="submit" data-theme="c">Cancel</button></div>
                    <div class="ui-block-b"><button type="submit" data-theme="b">Submit</button></div>
               </fieldset>
               
        </apex:tab>
    </apex:tabPanel>
    
    <apex:tabPanel >
        <apex:tab label="Checkboxes">
             <fieldset data-role="controlgroup">
                    <legend>Select Option:</legend>
                    <input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a"/>
                    <label for="checkbox-v-2a">Open</label>
                    <input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b"/>
                    <label for="checkbox-v-2b">Inprogress</label>
                    <input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c"/>
                    <label for="checkbox-v-2c">Completed</label>
             </fieldset><br/><br/>            
        </apex:tab>
    </apex:tabPanel>

</apex:form>    
</apex:page>
Hi, 

How to disable the View and Edit option to Notes And Attachment object in particular profile? 

Thanks
Hi All,

Suppose  object A is a child of  object B. And I need to create the master lookup with Object A.and Object C.

Thanks
Hi,
 How to hide the lookup field hyperlink for particular user only,when they are log in into salesforce. I have create the javascript and added into homepage component but it still not working. Kindly share ur knowledge. here my code

document.write('<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>');

document.write('<script src="/soap/ajax/28.0/connection.js" type="text/javascript"></script>');

document.write('<script src="/soap/ajax/28.0/apex.js" type="text/javascript"></script>');

Sfdc.onReady(function() {

 if (document.location.href.toString().indexOf("/a0C") != -1 && document.location.href.toString().indexOf("/a0C/o") == -1) {
    var VSCID = window.location.href.substring( window.location.href.indexOf('.com/') + 5);    
    
    var getProfName = sforce.connection.query("SELECT UserRole.Name,Profile.Name FROM User WHERE Id = '" + window.UserContext.userId + "' ");
    var records = getProfName.getArray("records");
    var SelectedProf = records[0]; 
    var UserRoleName = SelectedProf.UserRole.Name;
              alert(UserRoleName);
        var result = sforce.connection.query("SELECT id,Site_Contract__c FROM Visits__c WHERE Id = '" + VSCID + "'");
            var records = result.getArray("records");
            var SelectedRecord = records[0]; 
            var SiteContract = SelectedRecord.Site_Contract__c;
            alert(SiteContract);
            
            if(UserRoleName == 'Development')
            {
            alert('Welcome'+SiteContract);
            SiteContract.style.display = '';
            alert('End'+SiteContract);
                    
            }          

    } 

  });
Hi

How to remove the hyperlink in the ‘Lookup’ filed for particular profile Name only. I have used the java script and get the Element ID to using the style in Java script, but I can't remove the Hyperlink in that Lookup field. Kindly share your knowledge about this.
 
My code : var x = document.getElementsById("lookupa05f0000006ljSZ00ND0000005EdfF").style.pointerevents="none";
 
Thanks in Advance 
Hi,
How to override the Edit button in PricebookEntry object, there is no visible to button option. where i find the edit button in pricebookEntry

Thanks
Hi,

I am tried to create custom visualforce page for pricebookEntry, But When trying to insert a standard field in a visual force page i am getting following error message is:
Expression value does not resolve to a field
Error is in expression '{!PricebookEntry.Product2}' in component <apex:inputField> in page pricebookentry_edit


How to solve this?

Thanks.
Hi,

I tried the send Email notification for some one, when the pricebookentry price changed include standard price also. But i got error

Please refer the following code. what my mistake
trigger
=================
trigger PricebookEntry on Pricebook2(before insert, before update){
PricebookTriggerHandler handler = new PricebookTriggerHandler();

     if(trigger.isBefore && trigger.IsInsert){
       handler.OnBeforeInsert(trigger.newmap, Trigger.OldMap);
    } 
      
    if(trigger.isBefore && trigger.IsUpdate){
      handler.OnBeforeUpdate(trigger.newmap, Trigger.OldMap);
    } 
    
}

Trigger Controller
========================
Public class PricebookTriggerHandler{

    Public void OnBeforeInsert(map<id,Pricebook2> PrdNewMap,map<id,Pricebook2> PrdOldMap){
    
    }
    Public void OnBeforeUpdate(map<id,Pricebook2> PrdNewMap,map<id,Pricebook2> PrdOldMap){
        EmailNotification(PrdNewMap,PrdOldMap);
    }

   Public void EmailNotification(map<id,Pricebook2> PrdNewMap,map<id,Pricebook2> PrdOldMap){
    Set<Id> PriceId = new Set<Id>();
    List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
    
    for(pricebook2 price:PrdNewMap.values()){
        
     pricebookEntry Stdprice = [SELECT Id, Unitprice, UseStandardPrice FROM PricebookEntry WHERE Id = :priceId];

      Messaging.reserveSingleEmailCapacity(1);
       
       Messaging.SingleEmailMessage PriceNotificationmail = new Messaging.SingleEmailMessage(); 
     //  PriceNotificationmail.setToAddresses('sundhar.mks@gmail.com');
       PriceNotificationmail.setReplyTo('Sundhar.mks@gmail.com');
       PriceNotificationmail.setSenderDisplayName('Salesforce Support'); 
       
       
       String oldUnitprice = PrdOldMap.get(price.id).Unitprice;

        if (price.Unitprice != oldUnitprice) {
            PriceNotificationmail.setSubject(' Pricebook price updation : ' + 'Changed to ' + price.Unitprice + '. Pricebook Id:' + price.Id);
           // CaseNotificationmail.setPlainTextBody('Your pricebook : ' + ' has been updated.'+'To view your pricebook <a href=<a target="_blank" href="https://cs16.salesforce.com/'+price.Id'">https://cs16.salesforce.com/'+price.Id);</a>
  
        } 
     // Messaging.sendEmail(new Messaging.SingleEmailMessage[] { PriceNotificationmail});
      mails.add(PriceNotificationmail);
      }
     Messaging.sendEmail(mails);
    }

}
HI,

How to Send the Email notification. when the product pricebook price value changed?

Thanks,
Hi,

       I have written custom component and test class, i'm tried to deploy the code(Custom component and Test class) sandbox to production, i got Error: INVALID TYPE - My test class, I don't no what is a problem, Kindly give any solution to this

Thanks.
Hi

Kindly refer the following code,I have written sheduller class to deleteing Test record, need to send the email notification

Code
==============
global class TestRecordManager implements Schedulable{
    global void execute(SchedulableContext sc){ 
    try{
        //Get the Technician order records
        List<Technician_Orders__c> Technician =[SELECT Id,name FROM Technician_Orders__c WHERE Site_Address__r.Parent.Name LIKE 'Salesforce Test Customer%' OR Site_Address__r.name LIKE 'Salesforce Test Customer%' OR Site_Address__r.name LIKE 'Training%'];
        if(Technician.size() > 0)
        Delete Technician;
        
        //Get the supplier records
        List<SFDC_Purchase_Order__c> Supplier =[SELECT Id,name FROM SFDC_Purchase_Order__c WHERE Visit__r.Site__r.Parent.Name LIKE 'Salesforce Test Customer%' OR Visit__r.Site__r.Name LIKE 'Salesforce Test Customer%' OR Visit__r.Site__r.Name LIKE 'Training%'];
        if(Supplier.size() > 0)
        Delete Supplier; 
        
        //Get the SiteContract records
        List<SiteContracts__c> Sitecontract =[SELECT Id,name FROM SiteContracts__c WHERE  Parent_from_Site__c LIKE 'Salesforce Test Customer%' OR Site__r.name LIKE 'Salesforce Test Customer%' OR Site__r.name LIKE 'Training%'];
        if(Sitecontract.size() > 0)
        Delete Sitecontract;
        
        //Get the Visit records
        List<Visits__c> Visit =[SELECT Id,name FROM Visits__c WHERE  Parent_Account__c LIKE 'Salesforce Test Customer%' OR Site__r.name LIKE 'Salesforce Test Customer%' OR Site__r.name LIKE 'Training%'];
        if(Visit.size() > 0)
        Delete Visit;
       
       }
      catch(Exception e) {
      String msg=e.getMessage();    // How to send the email notification to user?

      
      }
    }

Thanks.
 }
Hi,

I have used following code to send the Email template with attachment to two record type 1.Riser Service sheet 2.Sprinkler Riser working well, but Sprinkler when i enter the value to Email field i got ERROR: ​Error:Apex trigger OpportunityTriggers caused an unexpected exception, contact your administrator: OpportunityTriggers: execution of AfterUpdate caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, List has no rows for assignment to SObject: []: Class.OpportunityTriggerHandler.EmailAttachment: line 1170, column 1

Please refer the following code
============================
  Private void SendEmailAttachment(Map<Id,Opportunity> newOppMap,Map<Id,Opportunity> oldOppMap){
        List<id> listMSSIds=new List<Id>();    // list of Mechanical Service Sheet Id
        String templateName;
        List<String> mailId;
        System.Debug('--------Starting----------');
        for(Opportunity opp:newOppMap.values()){        //Collecting the Mechanical Service Sheet ids from the Triggered Opportunities
            if(opp.Mechanical_Service_Sheet__c != NULL){
                listMSSIds.add(opp.Mechanical_Service_Sheet__c);
            }              
        }
        for(Opportunity opp:[select id,MSS_Service_Type__c,Copy_Email_for_Invoice__c,ownerId,Mechanical_Service_Sheet__c,
                         Accounts_Approved_Rejected__c,Management_Approved_Rejected__c,Service_Approved_Rejected__c ,Date_Copy_Invoice_Sent__c,
                         Priced__c , Manually_Sage_Invoiced__c,Manual_Invoicing__c,Invoice_email_to__c ,Email_for_Copy_SS_RS_SW__c
                         from Opportunity where id=:newOppMap.keyset()]){
                         
            if(opp.Copy_Email_for_Invoice__c!=NULL && opp.MSS_Service_Type__c!=NULL &&
                     (((!opp.Manual_Invoicing__c) && opp.Manually_Sage_Invoiced__c=='No') 
                     || ((!opp.Manual_Invoicing__c) && opp.Manually_Sage_Invoiced__c==NULL) || 
                     ((opp.Manual_Invoicing__c) && opp.Manually_Sage_Invoiced__c=='No')) && 
                   (opp.Copy_Email_for_Invoice__c!=oldOppMap.get(opp.id).Copy_Email_for_Invoice__c || opp.Manually_Sage_Invoiced__c!=oldOppMap.get(opp.id).Manually_Sage_Invoiced__c
                ||opp.Manual_Invoicing__c!=oldOppMap.get(opp.id).Manual_Invoicing__c)){
                mailId = new List<String>();
                templateName='Copy Invoice and MSS Cert';
                mailId.add(opp.Copy_Email_for_Invoice__c);
                EmailAttachment(templateName,listMSSIds,opp,mailId,false);
            }
            system.debug('Opportunity==='+opp);
            system.debug('Old Opp===='+oldOppMap.get(opp.id));
             if(opp.Accounts_Approved_Rejected__c =='Approved' && opp.Management_Approved_Rejected__c =='Approved' &&
                     opp.Manually_Sage_Invoiced__c!='Yes' && opp.Service_Approved_Rejected__c =='Approved' &&  opp.Priced__c =='PRICED' && opp.MSS_Service_Type__c!=NULL &&
                     (((!opp.Manual_Invoicing__c) && opp.Manually_Sage_Invoiced__c=='No') || ((!opp.Manual_Invoicing__c) && opp.Manually_Sage_Invoiced__c==NULL) || ((opp.Manual_Invoicing__c) && opp.Manually_Sage_Invoiced__c=='No')) && 
                     (opp.Accounts_Approved_Rejected__c!=oldOppMap.get(opp.id).Accounts_Approved_Rejected__c || opp.Management_Approved_Rejected__c != oldOppMap.get(opp.id).Management_Approved_Rejected__c ||
                     opp.Service_Approved_Rejected__c!=oldOppMap.get(opp.id).Service_Approved_Rejected__c || opp.Priced__c!= oldOppMap.get(opp.id).Priced__c ||
                     opp.Manually_Sage_Invoiced__c!=oldOppMap.get(opp.id).Manually_Sage_Invoiced__c)){
                templateName='MSS Opps Invoice';
                mailId = new List<String>();                
                mailId.add(opp.Invoice_email_to__c);                
                EmailAttachment(templateName,listMSSIds,opp,mailId,true);
                
            } 
            if(opp.Mechanical_Service_Sheet__c != NULL && opp.Email_for_Copy_SS_RS_SW__c != NULL &&
               (opp.Mechanical_Service_Sheet__c !=oldOppMap.get(opp.id).Mechanical_Service_Sheet__c 
               ||opp.Email_for_Copy_SS_RS_SW__c !=oldOppMap.get(opp.id).Email_for_Copy_SS_RS_SW__c ) ){
                templateName='Fire Supresion Sheet from Opp';
                mailId = new List<String>();                
                mailId.add(opp.Email_for_Copy_SS_RS_SW__c);                
                EmailAttachment(templateName,listMSSIds,opp,mailId,false);
                
            } 
            
        } 
        
    }     
    
 Private void EmailAttachment(String templateName,List<id> listMSSIds,Opportunity opp,List<String> toAddress, Boolean isOriginal ){
        // get The Email Template Id 
        EmailTemplate template = [Select id,name,subject from EmailTemplate 
                                  where name =:templateName];
              
        //Added the below code to prevent the mail to owner
        Contact tempContact  = new Contact();
        tempContact.LastName ='TestLast';
        tempContact.firstName = 'Testname';
        tempContact.email = toAddress[0];
        tempContact.Account = [select id, name from Account limit 1];
        Insert tempContact;

        //get The List Of Attachments In Mechanical Service Sheet
        List<Attachment> attachmentList=new List<Attachment>();
        if(opp.MSS_Service_Type__c=='Riser Service Sheet' || opp.MSS_Service_Type__c=='Sprinkler Service Sheet' ){
            attachmentList=[select name,body from Attachment Where ParentId IN:listMSSIds];
        }
        efaList = new List<Messaging.Emailfileattachment>();
        email = new Messaging.SingleEmailMessage();
        email.setTemplateId(template.id);
        //email.setTargetObjectId(opp.ownerId);
        email.setTargetObjectId(tempContact.id);
        email.setWhatId(opp.Id);
        email.setSaveAsActivity(false);
        
        if(isOriginal){email.setCCAddresses(new list<String>{'Sundhar.mks@gmail.com'});}
        System.Debug('--------attachmentList----------'+attachmentList);
        for(Attachment a:attachmentList){
            efa= new  Messaging.Emailfileattachment(); 
            efa.setFileName(a.name);
            efa.setBody(a.body);
            efaList.add(efa);
                         
        }
       email.setFileAttachments(efaList);
       
        List<Messaging.SingleEmailMessage> lstMsgs = new List<Messaging.SingleEmailMessage>();
        lstMsgs.add(email);
        
        Messaging.sendEmail(lstMsgs);
        
        //Delete the temp contact.
        delete tempContact;
        System.Debug('--------Ending----------'+lstMsgs); 
                                                                 
    } 


Thanks.
Hi,

Kindly refer the following code, How to write test class for this?
Code
===============
public with sharing class QuoteLineItemsManager{
    
    Public String qteId;
    Public List<QuoteLineItem> QLIs{get; set;} 
    
    public void setqteId (String s) {
        qteId= s;
        QLIs=new List<QuoteLineItem>();
        QLISELECT id,(Select id, PricebookEntry.Name,Description,Quantity,UnitPrice,TotalPrice, Capacity__c from QuoteLineItems ORDER BY SortOrder) from Quote where Id=:qteId].QuoteLineItems;
        system.debug('qteId==='+qteId);
    }      
    Public String getqteId(){
        return qteId;
    }
    Public QuoteLineItemsManager() {                        
        
    }

}

Thanks
Hi,

I have created email template for get the products information associate with the opportunity.it's working fine. How to send the Email primary contact of the opportunity? Kindly give any suggestion

Thanks.
Hi,

I have added the number of product to Opportunity. how to call the product information email template?

Is this need to add the product to price book entry before add the template? Kindly give any example

Thanks
Hi,

how to Send all the product information to the primary contact of the opportunity. How to achive this requirment. Kindly give any solution

Thanks
Hi,
Case object have picklist field of  Stage = Closed "Stage is a picklist field"
 
Hi,

       I have written custom component and test class, i'm tried to deploy the code(Custom component and Test class) sandbox to production, i got Error: INVALID TYPE - My test class, I don't no what is a problem, Kindly give any solution to this

Thanks.
Hi,

how to view the excel file preview in visualforce page,Is this possible? kindly give any example or code

Thanks.

 
User-added image


Good evening, I have a new problem I tried to load the lead from excel file, before converting them have converted files cvs.
The problem is that I do not automatically assign a name to each lead loading them; another thing, to be written as the data in the image or in a different way, because if I write them on the same columns and rows them to me by all as the sole lead. someone explain me how to write in excel pleasure to be able to load even 50 lead simultaneously? Thank you in advance
Hi,

I have tried the design look like Link: http://demos.jquerymobile.com/1.3.2/ to VF page, but css,jquery styles are not suported and. how to use the jquery properly in vf page. kindly refer the following code

VF page
============
<apex:page showheader="false" sidebar="false">
 <apex:form >  
        
   <apex:includeScript value="{!URLFOR($Resource.jqerymobile, '/js/jquery-1.4.5.min.js')}" />
    <apex:includeScript value="{!URLFOR($Resource.jqerymobile, '/js/jquery.mobile-1.4.5.min.js')}" />
    <apex:includeScript value="{!URLFOR($Resource.jqerymobile, '/js/jquery.mobile-1.4.5.js')}" />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.external-png-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.external-png-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.icons-1.4.5custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.icons-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-png-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-png-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-svg-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.inline-svg-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.structure-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.structure-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.theme-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile.theme-1.4.5.min.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery-ui-1.4.5.custom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery.mobile-1.4.5.mincustom.css')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jqerymobile, '/css/ui-lightness/jquery-ui-1.4.5.custom.css')}"  /> 
    
    <apex:tabPanel >
        <apex:tab label="Button">.
                    <div data-role="collapsible-set" data-theme="c" data-content-theme="d">
                
                <input type="Button" value="Anchor"/><br/>
                <br/>
                <input type="Button" value="Input"/><br/>
                <br/>
                <input type="Button" value="Submit"/><br/>
                <br/>
                <input type="Button" value="Reset"/><br/>
                <br/>
                <input type="Button" value="Dropdown"/><br/>
             
        </div><br/><br/>
     
        </apex:tab>
    </apex:tabPanel>
    
     <apex:tabPanel >
        <apex:tab label="Grid">
               <div class="ui-grid-a">
                    <div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">Block A</div></div>
                    <div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">Block B</div></div>
               </div>
               <fieldset class="ui-grid-a">
                    <div class="ui-block-a"><button type="submit" data-theme="c">Cancel</button></div>
                    <div class="ui-block-b"><button type="submit" data-theme="b">Submit</button></div>
               </fieldset>
               
        </apex:tab>
    </apex:tabPanel>
    
    <apex:tabPanel >
        <apex:tab label="Checkboxes">
             <fieldset data-role="controlgroup">
                    <legend>Select Option:</legend>
                    <input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a"/>
                    <label for="checkbox-v-2a">Open</label>
                    <input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b"/>
                    <label for="checkbox-v-2b">Inprogress</label>
                    <input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c"/>
                    <label for="checkbox-v-2c">Completed</label>
             </fieldset><br/><br/>            
        </apex:tab>
    </apex:tabPanel>

</apex:form>    
</apex:page>
Hi All,

Suppose  object A is a child of  object B. And I need to create the master lookup with Object A.and Object C.

Thanks
Hi

How to remove the hyperlink in the ‘Lookup’ filed for particular profile Name only. I have used the java script and get the Element ID to using the style in Java script, but I can't remove the Hyperlink in that Lookup field. Kindly share your knowledge about this.
 
My code : var x = document.getElementsById("lookupa05f0000006ljSZ00ND0000005EdfF").style.pointerevents="none";
 
Thanks in Advance 
Hi,
How to override the Edit button in PricebookEntry object, there is no visible to button option. where i find the edit button in pricebookEntry

Thanks
Hi,

I tried the send Email notification for some one, when the pricebookentry price changed include standard price also. But i got error

Please refer the following code. what my mistake
trigger
=================
trigger PricebookEntry on Pricebook2(before insert, before update){
PricebookTriggerHandler handler = new PricebookTriggerHandler();

     if(trigger.isBefore && trigger.IsInsert){
       handler.OnBeforeInsert(trigger.newmap, Trigger.OldMap);
    } 
      
    if(trigger.isBefore && trigger.IsUpdate){
      handler.OnBeforeUpdate(trigger.newmap, Trigger.OldMap);
    } 
    
}

Trigger Controller
========================
Public class PricebookTriggerHandler{

    Public void OnBeforeInsert(map<id,Pricebook2> PrdNewMap,map<id,Pricebook2> PrdOldMap){
    
    }
    Public void OnBeforeUpdate(map<id,Pricebook2> PrdNewMap,map<id,Pricebook2> PrdOldMap){
        EmailNotification(PrdNewMap,PrdOldMap);
    }

   Public void EmailNotification(map<id,Pricebook2> PrdNewMap,map<id,Pricebook2> PrdOldMap){
    Set<Id> PriceId = new Set<Id>();
    List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
    
    for(pricebook2 price:PrdNewMap.values()){
        
     pricebookEntry Stdprice = [SELECT Id, Unitprice, UseStandardPrice FROM PricebookEntry WHERE Id = :priceId];

      Messaging.reserveSingleEmailCapacity(1);
       
       Messaging.SingleEmailMessage PriceNotificationmail = new Messaging.SingleEmailMessage(); 
     //  PriceNotificationmail.setToAddresses('sundhar.mks@gmail.com');
       PriceNotificationmail.setReplyTo('Sundhar.mks@gmail.com');
       PriceNotificationmail.setSenderDisplayName('Salesforce Support'); 
       
       
       String oldUnitprice = PrdOldMap.get(price.id).Unitprice;

        if (price.Unitprice != oldUnitprice) {
            PriceNotificationmail.setSubject(' Pricebook price updation : ' + 'Changed to ' + price.Unitprice + '. Pricebook Id:' + price.Id);
           // CaseNotificationmail.setPlainTextBody('Your pricebook : ' + ' has been updated.'+'To view your pricebook <a href=<a target="_blank" href="https://cs16.salesforce.com/'+price.Id'">https://cs16.salesforce.com/'+price.Id);</a>
  
        } 
     // Messaging.sendEmail(new Messaging.SingleEmailMessage[] { PriceNotificationmail});
      mails.add(PriceNotificationmail);
      }
     Messaging.sendEmail(mails);
    }

}
HI,

How to Send the Email notification. when the product pricebook price value changed?

Thanks,
Hi,

I have added the number of product to Opportunity. how to call the product information email template?

Is this need to add the product to price book entry before add the template? Kindly give any example

Thanks
Hi,
Case object have picklist field of  Stage = Closed "Stage is a picklist field"
 

Hi all

 

I'm looking for a way to create a trigger on a pricebook entry that will run some logic each time a Product's price changes.

The problem is that as far as I can see there is no why to write a trigger on procebook and procebookentry.

 

Am I correct in assuming this type of triggered is not possible?

 

Any advise what is the right way to make this work is appreciated.

 

Thanks

 

 

  • May 31, 2012
  • Like
  • 0