• Nathan S
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
hi there,
we have this formula that calculates the number of quarter difference between today and 1 date field:
-----
if( (YEAR( DATEVALUE(NOW()) ) - YEAR(commit_date__c ))=0,
CASE (MONTH(DATEVALUE( NOW())), 
1,1, 
2,1, 
3,1, 
4,2, 
5,2, 
6,2, 
7,3, 
8,3, 
9,3, 
10,4, 
11,4, 
12,4, 
null 
)-
CASE (MONTH( commit_date__c), 
1,1, 
2,1, 
3,1, 
4,2, 
5,2, 
6,2, 
7,3, 
8,3, 
9,3, 
10,4, 
11,4, 
12,4, 
null),CASE (MONTH(DATEVALUE( NOW())), 
1,1, 
2,1, 
3,1, 
4,2, 
5,2, 
6,2, 
7,3, 
8,3, 
9,3, 
10,4, 
11,4, 
12,4, 
null 
)-
CASE (MONTH( commit_date__c ), 
1,1, 
2,1, 
3,1, 
4,2, 
5,2, 
6,2, 
7,3, 
8,3, 
9,3, 
10,4, 
11,4, 
12,4, 
null)+(YEAR( DATEVALUE(NOW()) ) - YEAR(commit_date__c ))*4)
-------
so if my commit_date__c = 3/23/2019, then the formula would return 4 (4 quarters difference from today vs that commit_date.
the formula works fine when we're on normal calendar :
Q1=Jan, feb, Mar
Q2=April/may/jun
Q3=jul/aug/sep and so on

today we want to switch our company quarter to the fiscal quarter9
4-4-5 weeks format).  anyone knows how to use formula fields to calculate the above formula or any formula that is related to fiscal calendars.  It seems like no formula whatsover can be built to return fiscal quarter, fiscal month or fiscal year from a date field.

our fiscal Quarter-1 for this year: from 01/27/2020 to 04/26/2020
fiscal Q2: 04/27/2020 to 07/26/2020
fiscal Q3: 07/27/2020 to 10/25/2020
fiscal Q4: 10/26/2020 to 01/31/2021

thanks & appreciate any inputs,
Hi Team,

Is is possible to write Asynchronous Trigger?

Regards
Lakshmi
I'm trying to create a new playground, but am unable to do so.  When I try to select create new trailhead playground, nothing happens.  The list doesn't even register that my curser is hovering over the options in the list.  What am I doing wrong?
Here is my page header:
<apex:page standardController="Pro_Sale__c" cache="false" standardStylesheets="true" showHeader="false" applyBodyTag="false" renderAs="pdf">

Here is the part of my style that controls borders:
        table.gridtable {
            border-collapse: collapse;
            border: 0px;

         }

        th {
            border: 1px solid #000;
            padding: 3px;
            border-collapse : collapse;
            border-spacing: 0;

         }
         
        td {
            border: 1px solid #000;
            padding: 3px;
            border-collapse : collapse;
            border-spacing: 0;
         }
        

When I render as html, it looks fine, with all borders as 1px. However, when I render as pdf, some lines are double thickness (and there is no rhyme or reason why some are and some aren't, though the double thickness seem to be around th more than td). I've tried with standardstylesheets="true" and "false" and still get the same results.
Hello, I know this was already posted but the post did not help in my case. please look at the code below.
Why am i receving this? I am doing something similar on a different page and it did not give me this problem (it was with a different field of the same object however.) - does the field type have something to do with it? the field is a picklist value.

Thank you 
<ul>
    <li>
     <span class="label">
       <apex:outputField value="Project Health"/>
      </span>
      <span class="field">
     <apex:image rendered="{!IF(focusedProject.Project_Health__c ="3", true, false)}" value="{!$Resource.RedStatus}" width="40" height="37"/>
     <apex:image rendered="{!IF(focusedProject.Project_Health__c ="2", true, false)}" value="{!$Resource.YellowStatus}" width="40" height="37"/>
     <apex:image rendered="{!IF(focusedProject.Project_Health__c ="1", true, false)}" value="{!$Resource.GreenStatus}" width="40" height="37"/>
      </span>
   </li>
</ul>

 
Hi! I would like to present my users with a custom VF page for entering/editing records. The page will have a number of tables and the cells of these tables will have a mix of hardcoded values and input options. I thought I was on the right track, but when I try to put an apex:inputField in one of the <td> tags, the HTML breaks and my table gets all messed up.

VF code:
<table border="1" style="width:800px">
                        <tbody><tr>
                            <th>EXCLUDE DBL AND BENEFITS</th>
                            <th>SAMPLE</th>
                            <th>YOURS</th> 
                            <th>KEY</th>
                        </tr>
                        <tr>
                            <td>Gross Commission Pr1</td>
                            <td>300000</td>
                            <td></td><td class="dataCol  first " colspan="2"><input id="j_id0:j_id2:j_id3:section1:j_id13" name="j_id0:j_id2:j_id3:section1:j_id13" size="20" style="width:100px" type="text"></td></tr><tr><td class="dataCol  last " colspan="2"></td>
                            <td>Book of Business minus DBL and Benefits</td>
                        </tr>
                    </tbody></table>
Image of broken table:
User-added image