ViewContentURL for PDF on Appserver
I have a PDF stored on the appserver, I'm using ViewContentURL on Component Record Field - Button (FieldChange) Peoplecode. When I run it, I receive i get an error message "You are not authorized to access this component. (40,20)". I have the correct permission list so I'm not sure why I'm still getting this message. I'm not sure if i'm using this correctly.
Raw Code:
&sCONQRSNAME="BENEFITS_TERMINATION_QUERY"
&WorkingFullPath = "files" | "/" | "CQ" | "/" | &sCONQRSNAME | "_" | UuidGen();
CreateDirectory(&WorkingFullPath, %FilePath_Relative);
/*...Bunch of code that generates PDF............*/
ViewContentURL(&WorkingFullPath | "/" | "BEN_COV_TERM.pdf")
I'm aware of Viewattachment() as well but not sure which is the best approach.