How do you debug mobile client scripts?

Patrick71
Tera Contributor

I just started learning about mobile development last week. My goal is to determine if there is a way to allow users to view attachments on NowMobile without downloading those attachments for security reasons. 

I believe that a script is the only way to accomplish this goal. Unfortunately I've not found any resources re: debugging mobile scripts, so I'm not sure how I can even go about building and testing a script to accomplish my goal. Any guidance at all would be appreciated!

1 ACCEPTED SOLUTION

hello , 

action item is the way to put your script, choose script instead new

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi,

Enable Document Viewer at the instance level and then enable it at the table level for the tables where you want to use it. Ensure that the system property com.snc.documentviewer.enable_document_viewer is set to true or create it if it does not already exist.

Activate Document Viewer for the tables where you want to use it.

  1. Navigate to System DefinitionDictionary.
  2. Open the table Collection record to update.
  3. Enter use_document_viewer=true in the Attribute field.

find_real_file.png

Do understand that attachment can be of any file type. And based on filee types, you need different softwares to open them.

If the attachment is video you cannot open it in in any documetn viewer. Similarly you cannot open a pdf under word player.

So you need to first check what all attachments you wanted to open and accordingly you have to integrate with different software. 

Document viewer helps you to open doc, xls, ppt pdf, jpg. It cannot open a video file.

Refer to this doc :https://docs.servicenow.com/bundle/sandiego-platform-user-interface/page/use/using-forms/concept/Doc...

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

My goal is to determine if there is a way to allow users to view attachments on NowMobile without downloading those attachments for security reasons. I have used doc viewer, but I have not found any way to disable attachment downloading while still allowing users to view.

hello , 

action item is the way to put your script, choose script instead new