Hi, The Java code is showing me error Attach cannot be resolved to be a variable. StrfileData cannot be resolved to be a variable.
@saipavanmuppidi61373 жыл бұрын
@@pegabytes yes. It's propetyset where we are giving output location. What about attach variable.
@akkunashu3 жыл бұрын
Define both property as Local Variable
@laxmanpanuganti3 жыл бұрын
@@akkunashu i defined local variables but Still im getting Attach cannot be resolved to be a variable, can you pls help me on this
@laxmanpanuganti3 жыл бұрын
Attach you can mention local variable take as a Boolean
@shivamgupta-br5zj2 жыл бұрын
Boolean attach ; String strFileData ; String strFileName = tools.getParamValue("OutputLocation"); PRFile objFile = new PRFile(strFileName); //some error checking if (!objFile.exists()) { attach = false; } if(!objFile.isFile()) { attach = false; } tools.putParamValue("OutputLocation",objFile.getName()); if (!objFile.canRead()) { attach = false; throw new PRRuntimeException("Can't continue with file upload. File \"" + strFileName + "\" is unreadable."); } //read the file into a buffer. java.io.DataInputStream dis = null; byte buffer [] = null; try { // dis = new java.io.DataInputStream(new java.io.FileInputStream(objFile)); dis = new java.io.DataInputStream(new PRInputStream(objFile)); buffer= new byte[dis.available()]; dis.readFully(buffer); dis.close(); } catch (Exception e) { attach = false; throw new PRRuntimeException("Can't continue with file upload. Can't read File \"" + strFileName + "\""); } //encode the file to Base64 so that we can store it on the database strFileData = Base64Util.encodeToString(buffer); if (strFileData == null) { attach = false; throw new PRRuntimeException("Can't continue with file upload. Couldn't encode the file to Base64 so that we can store it on the database"); } use this one
@ayanbiswas83811 ай бұрын
Very informative video along with great explanation. Thank you very much!
@pegabytes11 ай бұрын
Glad it was helpful!
@krishnamrajukola34432 жыл бұрын
Thanks for sharing most powerful information... 👍👍👍👍
@abhishekchoubey7935 Жыл бұрын
Very Helpful, Working Code, You are doing good Work 😊
@thorlikondagopi88423 жыл бұрын
Good work . Verry good explanation. Really helpful in real time projects
@willcho4243 Жыл бұрын
This video helped to make it work for me, thank you. Only difference is that i used Call pzMSOGenerateExcelAndSaveToWorkFileAttachment instead of Java code to get the file content stream. Other than that, i just followed it.
@willcho4243 Жыл бұрын
One thing noticed - the datetime came as "20230523T115300.000 GMT"
@willcho4243 Жыл бұрын
Using pxGenerateExcelFile returned a more user friendly datetime - 5/10/2023 7:32:00 AM
@apurbamajumder83083 жыл бұрын
Excellent video! You explained the whole process perfectly. Keep doing great work.
@DivakarRaja-bd6vu6 ай бұрын
Thanks bro.. It helps me a lot
@iessicamae Жыл бұрын
Really helpful video. Thank you so much for sharing it :)
@tanyasingh22947 ай бұрын
Hello sir,while copying the java code my activity rule is taking too long to get saved, have already added the parameters and local variables but after pasting the java code its not getting saved
@rajithmani79902 жыл бұрын
How to create the weekly report activity?
@pegatips557712 күн бұрын
email is getting sent but attachments are not getting added, is it because my email account is Microsoft
@pegabytes11 күн бұрын
Might be
@anudeepdeva20603 жыл бұрын
How to generate pdf and send email as an attachment?
@Varsha-qp9uv11 ай бұрын
Hey did u know how to send email with attachment
@Varsha-qp9uv11 ай бұрын
I am not getting excel attachment in mail. Can anyone help me with this
@abhijeetdas75682 жыл бұрын
Can you tell us how to attach multiple files to a single email as attachment?
@smritishikha39533 ай бұрын
hi , could please help me with it
@pegabytes3 ай бұрын
@smritishikha3953 let me Check
@LikesLaalithya_Aaryan Жыл бұрын
This record has 8 error(s) in 8 place(s) . Java at step: 8 line: 5 attach cannot be resolved to a variable Java at step: 8 line: 8 attach cannot be resolved to a variable Java at step: 8 line: 12 attach cannot be resolved to a variable Java at step: 8 line: 27 attach cannot be resolved to a variable Java at step: 8 line: 30 strFileData cannot be resolved to a variable Java at step: 8 line: 31 strFileData cannot be resolved to a variable Java at step: 8 line: 33 attach cannot be resolved to a variable Java at step: 8 line: 120 strFileData cannot be resolved to a variable Compile failed. java code is shown above errors please provide java code
@pegabytes Жыл бұрын
Please check java code properly May be your variables are not created Properly