Users would face this error though they had defined code level permission to access the file path.
In order to test if the logic is correct, we try the code snippet for the path check in a job and we get the expected result. So there is nothing wrong in our code but may be the approach has to be tuned.
How do we solve this? Check :
- What is the approach used for path exists check ? – Is it WinAPI or SystemIO ?
- If the logic is using WINAPI, check the framework in Ax classes .
- SysOperation framework supports WinAPI but not RunBase.
Thus if you are using RunBase in your class, try using System.IO approach
Example : System.IO.Directory::Exists