Posts

Showing posts from September, 2020

Uploading a file to the file server in peoplesoft peoplecode

Local string &InOutAttachUserfile, &file_name, &temp_dir, &InOutAttachSysfilename; Local integer &InMaxSize, &Result, &Return_Code; Local string &uniquefilename, &ATTACHSYSFILENAME, &ATTACHUSERFILE, &strFolderpath;     Local string &URL_ID = "record://HRS_ATTACHMENTS"; &Return_Code = AddAttachment(&URL_ID, &ATTACHSYSFILENAME, "", &ATTACHUSERFILE, &InMaxSize, True);     /*Create unique file name*/ &uniquefilename = "QBU_UPLOAD" | "_" | String(Month(%Date)) | "_" | String(Day(%Date)) | "_" | String(Year(%Date)) | "_" | String(Hour(%Time)) | "_" | String(Minute(%Time)) | "_" | String(Second(%Time)) | ".csv";   &ATTACHSYSFILENAME = Left(&uniquefilename, 64); &ATTACHSYSFILENAME = &uniquefilename;   COP_QBU_RCNTL.ATTACHSYSFILENAME.Value = &ATTACHSYSFILENAME; COP_QBU_RCNTL.ATTACHUSERFILE.Value = &ATT