Jump to content

Get(DocumentsPath) returns empty on Server Side script (sometimes)


Tompa79

This topic is 953 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a server side script that runs on regular interval. One of it's jobs is to create an agreement PDF and upload it to a server.

I had this working fine on one solution and have now built it on another solution. The problem is that when I try to get the documents path I get nothing. 

 

It took me a while to understand what was wrong, because when I called the script with static parameters from another part  of my server side script , there was no problem - I got a value for documents path.

 

From what I can see both calling scripts run with full access priviliges. 

Can I "mess up" my contact with the file system with another earlier command or something?

The blue line in the picture with $path returns empty and lasterror is 0. Save records as PDF can not perform if I set $path to documents folder specifically either.

Any ideas?

This is on a FM16 Server. (win 2016)

DocumentsPath.png

Link to comment
Share on other sites

I think I found the answer - script is run with "Full access privileges", BUT, when I debugged what priveliges was actually used it was a privilege set we use with wpe. That did not have printing or exporting allowed.

 

Link to comment
Share on other sites

I’d break it down and build up. Start with a script that simply sets the Get(DocumentsPath) in a field in a record in a temp table. Schedule this script to run using a full access account. Remember to establish context at the start of the script and perhaps bypass the onfirstwindowopen script. 

Link to comment
Share on other sites

This topic is 953 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.