Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
LTIMindtree
SA
Last activity: 11 Jul 2024 9:15 EDT
403 Forbidden, Error getting the datapage JSON [object Object] when calling datapage using Javascript API
I am using custom date control with help of custom HTML CSS JS jQuery for coloring particular dates and disabling past future dates and enabling only 14 dates from today
For colors of particular dates, I am calling a datapage after fetching it, I have some logic written to color the dates and enable only 14 days from today.
This is working fine using Admin role but for User role it throws below error.
403 Forbidden, Error getting the datapage JSON [object Object]
I am using the below code for fetching datapage.
var options = {
name: "dataPageName",
parameters: [{name: "param1", value: "Page1.prop1", isProperty: true}],
callback: callbackFunc,
event: eventObject
};
function callbackFunc(resultJSON){
console.log(resultJSON)
}
pega.api.ui.actions.getDataPage(options);
I'm calling a refreshSection to submit values to clipboard and a call to dataTransform to perform validation, I'm using below code for it
var options = {
section: sectionName,
event: eventObject,
dataTransform: dataTransformJSONObject,
submitOnRefresh: boolean
};
pega.api.ui.actions.refreshSection(options);