Has anyone used SuiteQL to fetch the fiscal year s...
# suiteql
a
Has anyone used SuiteQL to fetch the fiscal year start for a subsidiary?
c
Have you tried joining the fiscalcalendar table to
subsidiary.fiscalcalendar
?
a
I did but I receive
Search error occurred: Record 'fiscalcalendar' was not found
c
Hmm. Permissions maybe? I ran the following query and came up with the fiscal calendar for the subsidiary I was looking into
Copy code
SELECT *

FROM fiscalcalendar

JOIN subsidiary
ON   subsidiary.fiscalcalendar = fiscalcalendar.id

WHERE subsidiary.id = 1
a
Any guess at what permission that might be?
Oh, looks like Edit Role > Permissions > Searches > Standard > Fiscal Calendar
c
Did that do it?
a
Hmm. I must be misunderstanding something. When I try to do this and click Save, it just sends me back to the Roles list. The change is not being saved
c
I just reread your error message - what was your query?
a
Copy code
SELECT  sub.id, sub.name, sub.parent, c.symbol currency_symbol FROM subsidiary sub JOIN currency c ON c.id=sub.currency JOIN fiscalcalendar fc ON fc.id = c.fiscalcalendar WHERE sub.isinactive = 'F' AND sub.iselimination='F'
c
And that role has access to subsidiaries?
a
yeah
c
Shots in the dark here, but Setup > Subsidiary Settings Manager or Setup > Manage Accounting Periods?
🙏 1
🎉 1
a
Manage Accounting Periods > View did the trick!
Thank you!!
c
Huzzah! 😁
Glad to hear it worked
a
The only real content in the FiscalCalendar record is
fiscalmonth
-- I assume this always refers to the first month of the fiscal year? e.g. "Sep" implies the FY begins on Sept 1st ?
c
I believe so - it's documented with the label "First Fiscal Month" on the "fiscalcalendar" analytics browser page.
👍 1