Estoy tratando de usar el código a continuación y al usar el script de aplicaciones me da el error, que se describe a continuación:
"Error de tipo: no se puede leer la propiedad "date_config" de undefined".
Mi código se ve así:
function getConfig() { var config = cc.getConfig(); config.setDateRangeRequired(true); config .newSelectSingle() .setId('date_config') .setName('Select date preset') .setHelpText('Select the date preset for which you would like to receive the ads data.') .setAllowOverride(true) .addOption(config.newOptionBuilder().setLabel('Today').setValue('today')) .addOption(config.newOptionBuilder().setLabel('Yesterday').setValue('yesterday')) .addOption(config.newOptionBuilder().setLabel('This week (Sunday to today)').setValue('this_week_sun_today')) .addOption(config.newOptionBuilder().setLabel('Last week (Sunday to Saturday)').setValue('last_week_sun_sat')) .addOption(config.newOptionBuilder().setLabel('Last week (Monday to Sunday)').setValue('last_week_mon_sun')) .addOption(config.newOptionBuilder().setLabel('This month').setValue('this_month')) .addOption(config.newOptionBuilder().setLabel('Last month').setValue('last_month')) .addOption(config.newOptionBuilder().setLabel('This quarter').setValue('this_quarter')) .addOption(config.newOptionBuilder().setLabel('Last three days').setValue('last_3d')) .addOption(config.newOptionBuilder().setLabel('Last seven days').setValue('last_7d')) .addOption(config.newOptionBuilder().setLabel('Last 28 days').setValue('last_28d')) .addOption(config.newOptionBuilder().setLabel('Last 30 days').setValue('last_30d')) .addOption(config.newOptionBuilder().setLabel('Last 90 days').setValue('last_90d')) .addOption(config.newOptionBuilder().setLabel('This year').setValue('this_year')) .addOption(config.newOptionBuilder().setLabel('Last year').setValue('last_year')) .addOption(config.newOptionBuilder().setLabel('Maximum').setValue('maximum')) return config.build(); }