Sunday, September 16, 2018

Access the string data in the Task Record > "Recurrence field" via script

In the Scriptable Record Browser the recurrence field on Task record is not accessible. However, the string value in the field can be accessed with a combination of multiple fields in the 'task' record.


Here is a sample string value in the Recurrence field of Task Record:


Recurrence:  occurs every second day from 2010-4-23 until 2010-5-23 


_day_mode: "EVERY" //recurrence

_day_period: "2" //second day

_frequency: "DAY" //day, weeks, month

_month_dom: "23" //date


var testScript =  nlapiLoadRecord('task', 100);

var dayMode = testScript.getFieldValue('_day_mode');

var dayPeriod = testScript.getFieldValue('_day_period');

var frequency = testScript.getFieldValue('_frequency');


Other fields in the task record that are not listed but scriptable.


_month_dom_period: "2"

_month_dow: "6"

_month_dowim: "4"

_month_dowim_period: "2"

_month_mode: "DOM"

_week_dow_1: "F" //day of week

_week_dow_2: "F"

_week_dow_3: "F"

_week_dow_4: "F"

_week_dow_5: "F"

_week_dow_6: "T"

_week_dow_7: "F"

_week_period: "2"

_year_dom: "23" //day of month

_year_dow: "6"

_year_dowim: "4"

_year_dowim_month: "4"

_year_mode: "DOM"

_year_month: "4"


Note: The listed fields is supported in Suitescript but on read-only mode.

No comments:

Post a Comment