Generate a Fiscal Calendar

Role required: fiscal_calendar_admin

  1. Navigate to Fiscal Calendar > Generate
  2. Configure the form (see table).
  3. Click Generate Calendar.
  4. Navigate to System Definition > Fiscal Periods and verify that the monthly, quarterly, and annual fiscal period records exist.
FieldDescription
Fiscal Calendar TypesType of fiscal year calendar. Select the type of calendar by clicking it. The options in the lists update automatically.
Fiscal UnitBase unit for the calendar.
Month: Generate fiscal calendar with monthly periods.
Quarter: Generate fiscal calendar with quarterly periods.
Start MonthMonth that is the beginning of your fiscal year.
Start YearStarting year for the calendar.
Prefix for YearPrefix that the application uses in the name of the records that represent the fiscal year.
Prefix for Quarter/PeriodPrefix that the application uses in the name of the records that represent the fiscal quarter or period.
Start DayDay that represents the beginning of each month.
End YearEnding year for the calendar.
Prefix for Month/PeriodPrefix that the application uses in the name of the records that represent the month or period.

Syntax Editor Macro – grupdate

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

var gr = new GlideRecord('');
gr.addQuery('name','=','');
gr.query();
if (gr.next()){
gr.setValue("field","value"); //set field values
gr.update();
}

Syntax Editor Macro – vargror

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

var gr = new GlideRecord('');
 
var qc = gr.addQuery('field', 'value1');
 
qc.addOrCondition('field', 'value2');
gr.query();
while (gr.next()) {


}

Syntax Editor Macro – grinsert

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

var gr = new GlideRecord(""); //Provide table name
gr.initialize();
gr.setValue("field","value"); //set field values
gr.insert();

Syntax Editor Macro – deleteMultiple | deleteMultiple()

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

var gr = new GlideRecord("");
gr.addQuery('query');
//gr.addEncodedQuery('query');
gr.query();
while (gr.next()){
gr.deleteMultiple();
}

Syntax Editor Macro – delete | deleteRecord()

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

var gr = new GlideRecord("");
gr.addQuery('query');

//gr.addEncodedQuery('query');
gr.query();
if (gr.next()){
gr.deleteRecord();
}

Syntax Editor Macro – aclscript

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

(function() {
        answer = false;
        if (condition) {
                answer = true;
        }
})();

Syntax Editor Macro – info

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

gs.addInfoMessage(gs.getMessage(""));

Syntax Editor Macro – for

Syntax editor macro provides shortcuts for commonly used code. you can insert a macro by typing the macro name and hit <TAB> key and result of that macro name will be replaced with the full macro name.
Please note that this trick will not work in Background script(tested in Rome release).

for (var i=0; i< myArray.length; i++) {
 //myArray[i];
 
}