The customer is not able to comment on Idea portal. After impersonating that user.

Rai Shivam Ajay
Tera Contributor

The customer is not able to comment on Idea portal. After impersonating that user. Please, Can any help me. As below I am attaching the screenshot. Error getting is There is a JavaScript error in your browser console

2 ACCEPTED SOLUTIONS

Prashanth redd4
Kilo Guru

Hey Shivam,

 

Please check the client scripts running on the page. These errors generally occur due to the client scripts that are not checked all in the "UI TYPE".

 

Mark all the client scripts to work on all UI TYPE instead of Desktop only.

 

Prashanthredd4_0-1694789909491.png

 

Regards,

Prashanth Reddy

 

Please mark helpful If I am able to resolve your issue.

View solution in original post

Hey Shivam,

 

You will find more details about the error in the browser console. Go to that script and troubleshoot from there. In order to open the browser developer tool console,

  1. Right-click anywhere on the form.
  2. Select Inspect
  3. Select the Console tab

Find the Client script that is causing the issue. You will either need to update this script to work on both portal and backend views, or you will need to write a different script to run only on the portal, and leave the current script to run only on Desktop.

 

Regards,

Prashanth Reddy

 

Please mark helpful If I am able to resolve your issue.

View solution in original post

4 REPLIES 4

Prashanth redd4
Kilo Guru

Hey Shivam,

 

Please check the client scripts running on the page. These errors generally occur due to the client scripts that are not checked all in the "UI TYPE".

 

Mark all the client scripts to work on all UI TYPE instead of Desktop only.

 

Prashanthredd4_0-1694789909491.png

 

Regards,

Prashanth Reddy

 

Please mark helpful If I am able to resolve your issue.

Rai Shivam Ajay
Tera Contributor

Hello Prashanth,
I have tried. Still I am not able to resolve my issue.
Thank you

Hey Shivam,

 

You will find more details about the error in the browser console. Go to that script and troubleshoot from there. In order to open the browser developer tool console,

  1. Right-click anywhere on the form.
  2. Select Inspect
  3. Select the Console tab

Find the Client script that is causing the issue. You will either need to update this script to work on both portal and backend views, or you will need to write a different script to run only on the portal, and leave the current script to run only on Desktop.

 

Regards,

Prashanth Reddy

 

Please mark helpful If I am able to resolve your issue.

Hello Prashanth,
I have tried above step as you mention , Still I am not able to resolve my issue, As below I am attaching the screen shot of console. 

I am getting error in fetchComments and getCommentId.
As  below I am pasting the code , please can you review it.

 

fetchComment

 

(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
 
    var commentType = request.pathParams.type;
    var params = request.queryParams; 
 
if(gs.nil(params.sysparm_source_id))
return new sn_ws_err.BadRequestError(gs.getMessage('Invalid parameters'));
 
var cfCommentDataService = new CFCommentDataService();
var sourceSysId = params.sysparm_source_id;
 
if(commentType == 'child') {
var parentCommentSysId = params.sysparm_parent_id;
return cfCommentDataService.getChildComments(parentCommentSysId, sourceSysId);
} else if(commentType == 'parent') {
var startOffset = params.sysparm_start_offset;
var endOffset = params.sysparm_end_offset;
return cfCommentDataService.getTopCommentsForParentEntity(sourceSysId, startOffset, endOffset);
} else if(commentType == 'all_nested') {
return cfCommentDataService.getNestedComments(sourceSysId);
}
 
})(request, response);
 
getCommentId
 

(function process( /*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {

var cfCommentDataService = new CFCommentDataService();
return cfCommentDataService.getNewCommentId();

})(request, response);


Thanks & Regards
Shivam