function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kathir_prakashkathir_prakash 

Comparing fiscal year?

Hi all,

 

I am having text field, in that i want to dispaly the Fiscal Year and quarter of our company which we assigned in sales force.

 

Right Now I want to get the current Date Fiscal Year and Quarter from the company profile object, also i want to get the Fiscal year for the specified date by the user (eg:- if the user enter's one date in the text field then i want to display the fiscal year and quarter of the date entered by the user).the fiscal year should taken from the company profile,

 

but i do know how to get the FY and Quarter from the company profile, please help me in this issue.

 

Thank you all in advance,

 

regards,

prakash

Best Answer chosen by Admin (Salesforce Developers) 
Shilpa_SFShilpa_SF

Hi Prakash,

 

                   Fiscal year settings of the Company profile are accessible.

 

                   This is how you can do , In Force.com IDE (eclipse) you can query the object using the following query :

 

                   Select f.YearType, f.WeekStartDay, f.WeekLabelScheme, f.SystemModstamp, f.StartDate, f.QuarterPrefix,

                   f.QuarterLabelScheme, f.PeriodPrefix, f.PeriodLabelScheme, f.PeriodId, f.Name, f.IsStandardYear, f.Id,

                   f.EndDate, f.Description From FiscalYearSettings f

 

 

 

 

 

 

 

 

All Answers

Shilpa_SFShilpa_SF

Hi Prakash,

 

                   Fiscal year settings of the Company profile are accessible.

 

                   This is how you can do , In Force.com IDE (eclipse) you can query the object using the following query :

 

                   Select f.YearType, f.WeekStartDay, f.WeekLabelScheme, f.SystemModstamp, f.StartDate, f.QuarterPrefix,

                   f.QuarterLabelScheme, f.PeriodPrefix, f.PeriodLabelScheme, f.PeriodId, f.Name, f.IsStandardYear, f.Id,

                   f.EndDate, f.Description From FiscalYearSettings f

 

 

 

 

 

 

 

 

This was selected as the best answer
kathir_prakashkathir_prakash

Hi Shilpa,

 

Thank you for your kind replying, its working fine for me thank you for giving the solution.

 

regards,

prakash

Farhat MirzaFarhat Mirza

Hi, 

 

I have standard fiscal year setting but my fiscal year ranges  from Jul-Jun

and  Fiscal Year is Based On ending month. 

My query looks like

Select ID,fiscal_year(Date__c) FY,fiscal_month(Date__c) FM from TransHeader__c Group By ID ,fiscal_year(Date__c),fiscal_month(Date__c)

 

For Date__c: Aug-15-2011

Returns

FY: 2011

FM:2

Expected FY: 2012 if ending month settings is set.

 

The FY always returns fiscal year  based on starting month settings not on ending month settings.

 

Any feed on this will be of great help to me.