• Durai Saravanan
  • NEWBIE
  • 115 Points
  • Member since 2018

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 13
    Replies
q.) A changeset deployment from sandbox to production fails due to       failure in managed package unit test. The developer spoke with the managed package owner and they determine it is a false positive and can be ignored.
What should the developer do to deploy?
a.) Edit the managed package unit tests
b.) Select "Fast Deploy" to run only the test that are in change set
c.) Select "Run Local Tests" to run only the test that are in change set
d.) Select "Run Local Tests" to run only the test  in the org that are not in the managed package.
Hi Team,
Please help me on below formula as each and every line with expaination.

IF( 
ISPICKVAL( Severity__c , "Critical")&& ISBLANK(Plan_Due_By_Date__c ), CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+2+10, 
1,Plan_Due_By_Date___c+4+10,  
2,Plan_Due_By_Date___c+4+10, 
3,Plan_Due_By_Date___c +4+10, 
4,Plan_Due_By_Date___c +4+10, 
5,Plan_Due_By_Date___c+4+10, 
Plan_Due_By_Date___c+3+10), 
IF( 
ISPICKVAL( Severity__c , "High")&&ISBLANK(Plan_Due_By_Date__c ), CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+2+10, 
1,Plan_Due_By_Date___c+4+10, 
2,Plan_Due_By_Date___c+4+10, 
3,Plan_Due_By_Date___c +4+10, 
4,Plan_Due_By_Date___c +4+10, 
5,Plan_Due_By_Date___c+4+10, 
Plan_Due_By_Date___c+3+10), 
IF( 
ISPICKVAL( Severity__c , "Medium")&&ISBLANK(Plan_Due_By_Date__c ), CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+6+20, 
1,Plan_Due_By_Date___c+8+20, 
2,Plan_Due_By_Date___c+8+20, 
3,Plan_Due_By_Date___c +8+20, 
4,Plan_Due_By_Date___c +8+20, 
5,Plan_Due_By_Date___c+8+20, 
Plan_Due_By_Date___c+7+20), 
IF( 
ISPICKVAL( Severity__c , "Low")&&ISBLANK(Plan_Due_By_Date__c ),CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+10+30, 
1,Plan_Due_By_Date___c+12+30, 
2,Plan_Due_By_Date___c+12+30, 
3,Plan_Due_By_Date___c+12+30, 
4,Plan_Due_By_Date___c+12+30, 
5,Plan_Due_By_Date___c+12+30, 
Plan_Due_By_Date___c+41),Plan_Due_By_Date__c 



)

Thanks in advance

Thanks,
Venkat.
Hi,

I have requirement to schedule the below code on the third friday of every month, which i can do through "Schedule apex" option in UI itself.
 
global class ApexScheduledClass Implements Schedulable
{
   global void execute(SchedulableContext sc)
        {
        if(/*Today is not last working day*/) {
            sendmail();
           // ApexScheduledClass.Schedulable.execute(System.param1);
        } else if (/*Today is the last working day*/) {
            sendremaindermail();
        }
    }
    
    public void sendmail()
    {
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        string [] toaddress= New string[]{'durairaj1696@gmail.com'};
        email.setSubject('Testing Apex Scheduler-Subject');
        email.setPlainTextBody('Testing Apex Scheduler-Body');
        email.setToAddresses(toaddress);
        Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
    }
    
    public void sendremaindermail()
    {
       Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
       string [] toaddress= New string[]{'durairaj1696@gmail.com'};
       email.setSubject('Testing Apex Scheduler-Subject');
       email.setPlainTextBody('Testing Apex Scheduler-Body');
       email.setToAddresses(toaddress);
       Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
    }
}

Now, when it runs on third friday of every month, it must again schedule itself to run after 5 days from then.

How can i do that. Any suggestion is welcome. Thanks in advance.

Thanks,
Durairaj


 
Hi,

Good day!

I have a integer variable 'c_status ' in my controller. And in my visualforce page, the backrgound color of a particular div must be based on the value of 'c_status '., like,
if 'c_status ' == 1 , my background color must be green
else if  'c_status ' == 2, my background color must be yellow
else if  'c_status ' == 3, my background color must be red

How should i do that?

My visualforce page : 
<apex:page controller="Monthly_review_VFC" action="{!execute}" sidebar="false" >
 <head>
  <style type="text/css" media="screen">
    html, body{
        margin:0px;
        padding:0px;
        height:100%;
        overflow:hidden;
    }   
  </style>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 </head>
 <body style="overflow:auto">
  <h1>Monthly Review:</h1>
  <br/>
  Click on the particular account to get their performance in last month
  <br/><br/>
  <apex:form>
      <div class="container">
      <div class="well" style = "background-color:black; color: white; margin-right: 100px;" >Arthur J. Gallagher &amp; Co.<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div> 
      <div class="well" >RPX Corporation<br/> <!-- The condition should be for this tag -->
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
      <div class="well">CredHub<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
      <div class="well">Valet Living<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
      <div class="well">Healthy Paws Pet Insurance<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
     </div>
  </apex:form> 
 </body>
</apex:page>
My Controller:
 
public class Monthly_review_VFC { 

    Integer c_status {get; set;}
            public void execute() {
            Integer c_status = 1;
          }
}

Please suggest me some ideas on this. 

Thanks in advance,
Durairaj
Hi,

I am trying to display the serialised object in Vfpage. I am struck in the middle. I have mentioned in comments, where i am struck

My Visualforce Page:
<apex:page standardStylesheets="false" showHeader="false" controller="Gantt_chart_VFC" action="{!getData}">
    <head>
    <apex:stylesheet value="{!URLFOR($Resource.Gantt, 'codebase/dhtmlxgantt.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Gantt, 'codebase/dhtmlxgantt.js')}"/>
     <style type="text/css" media="screen">
    html, body{
        margin:0px;
        padding:0px;
        height:100%;
        overflow:hidden;
    }   
</style>
    </head>
   
    <body>
    
    <h1> Monthly Review </h1>
    <div id="gantt_here" style='width:100%; height:100%;'></div>
    <script type="text/javascript">
        var tasks =  "";   //Struck_here
        gantt.config.readonly = true;
        gantt.init("gantt_here");


        gantt.parse(tasks);

    </script>
    
    </body>
</apex:page>

My main controller:
public class Gantt_chart_VFC {

    public void getData() {
    
    List<Project__c> LstProject = [select Name,Actual_start_date__c,Actual_end_date__c,Planned_end_date__c,Planned_start_date__c,(Select Name,Begin_date__c,End_date__c from milestone__r) from Project__C where Account__c  = '0011000001L9ByhAAF'];
        JSON2Apex objectofJSON2Apex = new JSON2Apex();
        List<JSON2Apex.DataClass> lstData = new List<JSON2Apex.DataClass>();
        for(Project__c eachProject : LstProject)
        {
              JSON2Apex.DataClass varData = new JSON2Apex.DataClass();
              varData.Id = eachProject.Id;
              varData.Text = eachProject.Name;
              varData.start_date = eachProject.Actual_start_date__c;
              varData.end_date = eachProject.Actual_end_date__c;
              varData.open = true;
              lstData.add(varData);  
               
              for(Milestone__c eachMilestone : [Select Name,Begin_date__c,End_date__c from milestone__c where project__c =: eachProject.Id]) 
              {    
                  JSON2Apex.DataClass varDataMilestone = new JSON2Apex.DataClass();
                  varDataMilestone.Id = eachMilestone.Id;
                  varDataMilestone.Text = eachMilestone.Name;
                  varDataMilestone.start_date = eachMilestone.Begin_date__c;
                  varDataMilestone.end_date = eachMilestone.End_date__c;
                  varData.open = false;
                  varDataMilestone.parentId = eachProject.Id;
                  lstData.add(varDataMilestone);
                 
              }       
        }                    
        objectofJSON2Apex.data = lstData;
        String strJson = JSON.serialize(objectofJSON2Apex);
    }
}

My Json2Apex class :
public class JSON2Apex {

    public List<DataClass> data;

    public class DataClass {
        public Id id;
        public String text;
        public Date start_date;
        public Date end_date;
        public Boolean open;
        public Id parentId;
    }
   
}

Thanks in advance, 
Durairaj
Hi,

Good Day!

How should i assign today date to 'Actual_start_date__c', When Start Project(Custom button) is clicked. The javascript code for the custom button is given below. 
 
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 

// identify the record 
var o = new sforce.SObject("Project__c"); 
o.id = "{!Project__c.Id}"; 

// Update the Record Type 
o.RecordTypeId = '01210000000FCJwAAO'; 
o.Status__c = 'Active';
o.Actual_start_date__c = {!TODAY()};

// save the change 
//sforce.connection.update(o); 
var result = sforce.connection.update([o]); 

//refresh the page 
//window.location.reload(); 

if( result[0].success === "true" ) { 
window.location.reload(); 
} 
else { 
alert( result[0].errors.message ); 
}


Thanks in advance,
Durairaj
Hi,

Good day!
I have two custom objects, Project__c and Milestone__c,
Here, Milestone__c is having Lookup to Project__c. [Every project will have several milestone]
Project_c has two date fields(start_date__c , end_date__c)
Milestone__c has two date fields(start_date__c , end_date__c)

So, When i create a milestone, I select the project__c to which this milestone is going to be part of. And this milestone's duration should be within the start_date__c and end_date__c of the project__c it is belonging to. 

Is there any way to restrict the values displayed in start_date__c and end_date__c fields of the milestone__c, to be within the duration of project it is belonging to.


Thanks in advance,
Durairaj Saravanan.
Hi,

I would like to have a 'Close Project' (Custom button) in my 'Project'(Custom Object) record's page layout. When i click the 'Close Project' button, the record type of particular record must change from 'Current' to 'Closed'.

How i should do this? Thanks in advance

Thanks and regards,
Durai
Hello,

I have a custom field not working with VF. This field has been around for over a year, and one of the fields in my table has stopped working. As far as I can tell, nothing has changed in the org or code, the only update that has happened is the Spring '19 rollout. 

If anyone can guide me in this, that'd be great. I have an example of my code table below.

<table id="equipta">
              <tr>
                <th>Transaction Amount</th>     <th>Model Make</th> <th>Model Year</th>    <th>Model#</th> <th>Description</th>
                  <th>Qty</th>  <th>Unit Cost</th>  <th>Age<br />(New/Used)</th>    <th>Usage/Year</th> <th>Usage Type<br />(Miles/Hours)</th>
                   </tr>
              <tr>
                   <td><apex:inputField value="{!EMG_Valuation__c.Transaction_Amount1_EMG_Req__c}" style="width:115px;" label="Transaction Amount" /></td>
                  <td><apex:inputField value="{!EMG_Valuation__c.Model_Make_1_EMG_Req__c}" style="width:65px;" label="Model Make" /></td> 
                  <td><apex:inputField value="{!EMG_Valuation__c.Model_Year1_EMG_Req__c}" style="width:65px;" label="Model Year" /></td>
                   <td><apex:inputField value="{!EMG_Valuation__c.Model1_EMG_Req__c}" style="width:75px;" label="Model #" /></td>
                   <td><apex:inputField value="{!EMG_Valuation__c.Description1_EMG_Req__c}" style="width:125px;" label="Description" /></td>
                   <td><apex:inputField value="{!EMG_Valuation__c.Qty1_EMG_Req__c}" style="width:25px;" label="Qty" /></td>
                   <td><apex:inputField value="{!EMG_Valuation__c.Unit_Cost1_EMG_Req__c}" style="width:75px;" label="Unit Cost" /></td>
                    <td><apex:inputField value="{!EMG_Valuation__c.Age1_EMG_Req__c}" style="width:80px;" label="Age (New/Used)" /></td>
                    <td><apex:inputField value="{!EMG_Valuation__c.Usage_Year1_EMG_Req__c}" style="width:75px;" label="Usage/Year" /></td>
                    <td><apex:inputField value="{!EMG_Valuation__c.Usage_Type1_EMG_Req__c}" style="width:100px;" label="Usage Type (Miles/Hours)" /></td>
              </tr>
</table>


Any help is appreciated.

Thanks!!
Hi All,

I facing an issue with my VF page in which I have used slds for styling. When I tried to preview the page from VF page it shows fine but when using same VF page on site and tried to preview it as admin it shows diffrent styling.

<apex:page  showheader="false" sidebar="false"  standardStylesheets="false" applyHtmlTag="false" lightningStyleSheets="true" applyBodyTag="false" docType="html-5.0" id="leadcaptureform" >
    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
        <head>
            <apex:slds />
        </head>
        
        <body>
            <apex:image id="theImage1" value="{!$Resource.Test}" width="150" height="40" alt="abc" style=""/>
            <div class="slds-scope">
                <div class="slds-page-header" style="background-color:green;">
                    <div class="slds-align_absolute-center" style="background-color:green;height:60px;">
                        <apex:image id="theImage" value="{!$Resource.Test}" width="150" height="40" alt="ttt" style=""/>
                    </div>
                </div>      
            </div>
        </body>
    </html> 
</apex:page>


User-added image
Although It must show as per below screenshot.

User-added imageSame scenario when I implemented in my dev org it is working fine and showing page fine on site as well but in sandbox it is not behaving as expected.

Please suggest anything which I'm missing. Thanks in advance.
  • February 14, 2019
  • Like
  • 0
I want to add two dropdowns at contact create form and I want to fetch these dropdowns value from an object It can be possible.
Please suggest the best idea.
q.) A changeset deployment from sandbox to production fails due to       failure in managed package unit test. The developer spoke with the managed package owner and they determine it is a false positive and can be ignored.
What should the developer do to deploy?
a.) Edit the managed package unit tests
b.) Select "Fast Deploy" to run only the test that are in change set
c.) Select "Run Local Tests" to run only the test that are in change set
d.) Select "Run Local Tests" to run only the test  in the org that are not in the managed package.
1. Which two components are available to deploy using Metadata Api?
  a.) Web- to -lead
  b.) Lead conversion settings
  c.) Web- to -case
  d.) Case Settings
Hi Team,
Please help me on below formula as each and every line with expaination.

IF( 
ISPICKVAL( Severity__c , "Critical")&& ISBLANK(Plan_Due_By_Date__c ), CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+2+10, 
1,Plan_Due_By_Date___c+4+10,  
2,Plan_Due_By_Date___c+4+10, 
3,Plan_Due_By_Date___c +4+10, 
4,Plan_Due_By_Date___c +4+10, 
5,Plan_Due_By_Date___c+4+10, 
Plan_Due_By_Date___c+3+10), 
IF( 
ISPICKVAL( Severity__c , "High")&&ISBLANK(Plan_Due_By_Date__c ), CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+2+10, 
1,Plan_Due_By_Date___c+4+10, 
2,Plan_Due_By_Date___c+4+10, 
3,Plan_Due_By_Date___c +4+10, 
4,Plan_Due_By_Date___c +4+10, 
5,Plan_Due_By_Date___c+4+10, 
Plan_Due_By_Date___c+3+10), 
IF( 
ISPICKVAL( Severity__c , "Medium")&&ISBLANK(Plan_Due_By_Date__c ), CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+6+20, 
1,Plan_Due_By_Date___c+8+20, 
2,Plan_Due_By_Date___c+8+20, 
3,Plan_Due_By_Date___c +8+20, 
4,Plan_Due_By_Date___c +8+20, 
5,Plan_Due_By_Date___c+8+20, 
Plan_Due_By_Date___c+7+20), 
IF( 
ISPICKVAL( Severity__c , "Low")&&ISBLANK(Plan_Due_By_Date__c ),CASE( MOD(Today()-DATE(1900, 1, 7),7),0,Plan_Due_By_Date___c+10+30, 
1,Plan_Due_By_Date___c+12+30, 
2,Plan_Due_By_Date___c+12+30, 
3,Plan_Due_By_Date___c+12+30, 
4,Plan_Due_By_Date___c+12+30, 
5,Plan_Due_By_Date___c+12+30, 
Plan_Due_By_Date___c+41),Plan_Due_By_Date__c 



)

Thanks in advance

Thanks,
Venkat.
I have a table where it creates PDF depends on number of values , i would like to generate this  in a way that i have to push the few of the values to next page and show it with Subtotal and Discounted Total estimated charges on one page when the values are like this .Do i have to use a specific format for this ?

<?xml version="1.0" encoding="UTF-8"?>
<template pageSize="LETTER" pageOrientation="portrait" pageMargins="40 60 40 50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="fx-report-schema_1_0.xsd">
  <header>
    <table marginLeft="50" marginTop="20" border="false false false false" columnWidths="*">
    <tableBody>
        <row>
      <cell style="header-footer"  border="false false false false"><image width=
      </image></cell>
        </row>
        </tableBody></table>
  </header>

  <body>
    <table marginTop="30" columnWidths="110 150 * 90">
      <tableBody>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">Customer:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.FX5__CustomerAccount__r.Name}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">Field Ticket No:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{Name}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">Customer Field Rep:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{Customer_Printed_Name__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">Service District:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.FX5__Office__r.Short_Company_Name__c}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">Well Name:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.Well_Name_Report__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">Service Line:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.RecordType.Name}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">Field:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.Field__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">Date:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{formatDate FX5__Ticket_Date__c format="MM/DD/YY"}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">County, State:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.County_Parish_State__c}}  {{FX5__Job__r.Well_Zip_Code__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">Sales Representative:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.Sales_Contact__r.Name}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">API Number:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.Well_API__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">District Representative:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.District_Representative__r.Name}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">Job Type:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{FX5__Job__r.SAP_Job_Type__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false">C&amp;J Field Representative:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{C_J_Field_Representative_1a__r.FirstName}}  {{C_J_Field_Representative_1a__r.LastName}}</cell>
        </row>
        <row>
            <cell fontSize="10" bold="true" border="false false false false">CT Unit:</cell>
            <cell fontSize="10" bold="false" border="false false false false">{{Fleet_or_Unit__c}}</cell>
            <cell alignment="right" fontSize="10" bold="true" border="false false false false"></cell>
            <cell fontSize="10" bold="false" border="false false false false"></cell>
        </row>
      </tableBody>
    </table>
{{#filter FX5__Ticket_Items__r "Exclude_from_Customer_Reports__c" is=false}}
       {{#group items "Report_Category__c" desc=false sort="Report_Category_Order__c"}}   
       {{#if items.length}}
      
          <table marginTop="10" columnWidths="35 * 35 45 40 40 50 60">
            <tableBody>
            <row>
                <cell alignment="center" bold="true" fillColor="#D9D9D9" fontSize="10" colSpan="8">{{Report_Category__c}} Items</cell>
              <emptyCell></emptyCell>
              <emptyCell></emptyCell>
              <emptyCell></emptyCell>
              <emptyCell></emptyCell>
              <emptyCell></emptyCell>
              <emptyCell></emptyCell>
              <emptyCell></emptyCell>
            </row>
            <row >
              <cell bold="true" alignment="left" fillColor="#D9D9D9" fontSize="8">Item #</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">Description</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">Qty</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">Price</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">UOM</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">Discount</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">Gross</cell>
              <cell bold="true" alignment="center" fillColor="#D9D9D9" fontSize="8">Net</cell>
            </row>
        
            {{#each items}}    
              <row >
                <cell alignment="left" fontSize="8">{{FX5__Item_Code__c}}</cell>
                <cell alignment="left" fontSize="8">{{FX5__Description__c}}</cell>
                <cell alignment="center" fontSize="8">{{FX5__Input_Qty__c}}</cell>
                <cell alignment="right" fontSize="8">{{formatCurrency FX5__Price__c symbol="$" precision="2" separator="," decimal="."}}</cell>
                <cell alignment="center" fontSize="8">{{Catalog_Item_UOM__r.Name}}</cell>
                <cell alignment="center" fontSize="8">{{formatPercent FX5__Discount_Percent__c decimalPlaces=2}}</cell>
                <cell alignment="right" fontSize="8">{{formatCurrency Subtotal__c symbol="$" precision="2" separator="," decimal="."}}</cell>
                <cell alignment="right" fontSize="8">{{formatCurrency Extended_Amount__c symbol="$" precision="2" seperator="," decimal="." }}</cell>
              </row>
            {{/each}}
           
            <row >
              <cell fillColor="#D9D9D9" italics="true" color="black" bold="true" fontSize="9" colSpan="7" alignment="right">Subtotal:</cell>
              <emptyCell fillColor="#D9D9D9"></emptyCell>
              <emptyCell fillColor="#D9D9D9"></emptyCell>
              <emptyCell fillColor="#D9D9D9"></emptyCell>
              <emptyCell fillColor="#D9D9D9"></emptyCell>
              <emptyCell fillColor="#D9D9D9"></emptyCell>
              <emptyCell fillColor="#D9D9D9"></emptyCell>
              <cell fillColor="#D9D9D9" alignment="right" color="black" bold="true" fontSize="9">{{sum items "Extended_Amount__c" symbol="$" precision="2" seperator="," decimal="."}}</cell>
            </row>
            </tableBody>
        </table>
  {{/if}}
            {{/group}}
            {{/filter}}     
    <table columnWidths="* 60" marginTop="10">
      <tableBody>
        <row>
          <cell fillColor="#D9D9D9" fontSize="9" bold="true" alignment="right" italics="true">Discounted Total Estimated Charges</cell>
          <cell fillColor="#D9D9D9" fontSize="9" bold="true" alignment="right">${{sum FX5__Ticket_Items__r "Extended_Amount__c"}}</cell>
        </row>
          <row>
              <cell border="false false false false" colSpan="2" fontSize="7">This is a cost estimate only.  Actual charges are to based on equipment, chemicals, materials, and personnel required to complete the job. This does not include sales tax or well services tax that may be included at the time of invoicing.</cell>
              <emptyCell></emptyCell>
          </row>
      </tableBody>
    </table>



User-added image
Hi,

Good day!

I have a integer variable 'c_status ' in my controller. And in my visualforce page, the backrgound color of a particular div must be based on the value of 'c_status '., like,
if 'c_status ' == 1 , my background color must be green
else if  'c_status ' == 2, my background color must be yellow
else if  'c_status ' == 3, my background color must be red

How should i do that?

My visualforce page : 
<apex:page controller="Monthly_review_VFC" action="{!execute}" sidebar="false" >
 <head>
  <style type="text/css" media="screen">
    html, body{
        margin:0px;
        padding:0px;
        height:100%;
        overflow:hidden;
    }   
  </style>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 </head>
 <body style="overflow:auto">
  <h1>Monthly Review:</h1>
  <br/>
  Click on the particular account to get their performance in last month
  <br/><br/>
  <apex:form>
      <div class="container">
      <div class="well" style = "background-color:black; color: white; margin-right: 100px;" >Arthur J. Gallagher &amp; Co.<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div> 
      <div class="well" >RPX Corporation<br/> <!-- The condition should be for this tag -->
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
      <div class="well">CredHub<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
      <div class="well">Valet Living<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
      <div class="well">Healthy Paws Pet Insurance<br/>
      <apex:commandButton Value="Gantt Chart" action="/apex/Gantt_Chart"/>
      </div>
     </div>
  </apex:form> 
 </body>
</apex:page>
My Controller:
 
public class Monthly_review_VFC { 

    Integer c_status {get; set;}
            public void execute() {
            Integer c_status = 1;
          }
}

Please suggest me some ideas on this. 

Thanks in advance,
Durairaj
Hi,

Good Day!

How should i assign today date to 'Actual_start_date__c', When Start Project(Custom button) is clicked. The javascript code for the custom button is given below. 
 
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 

// identify the record 
var o = new sforce.SObject("Project__c"); 
o.id = "{!Project__c.Id}"; 

// Update the Record Type 
o.RecordTypeId = '01210000000FCJwAAO'; 
o.Status__c = 'Active';
o.Actual_start_date__c = {!TODAY()};

// save the change 
//sforce.connection.update(o); 
var result = sforce.connection.update([o]); 

//refresh the page 
//window.location.reload(); 

if( result[0].success === "true" ) { 
window.location.reload(); 
} 
else { 
alert( result[0].errors.message ); 
}


Thanks in advance,
Durairaj
Hi,

Good day!
I have two custom objects, Project__c and Milestone__c,
Here, Milestone__c is having Lookup to Project__c. [Every project will have several milestone]
Project_c has two date fields(start_date__c , end_date__c)
Milestone__c has two date fields(start_date__c , end_date__c)

So, When i create a milestone, I select the project__c to which this milestone is going to be part of. And this milestone's duration should be within the start_date__c and end_date__c of the project__c it is belonging to. 

Is there any way to restrict the values displayed in start_date__c and end_date__c fields of the milestone__c, to be within the duration of project it is belonging to.


Thanks in advance,
Durairaj Saravanan.