Handling File Attachment Size Dynamically:
We can easily hardcode the File Size limit by setting a value to the &size variable in below code.
But if we want to use it dynamically, then we can get the value and use Int to convert the value to an integer and use it. Since Value(&size) returns a decimal value, it is not accepted.
&size = Int(&fsize);
&RETCODE = AddAttachment(URL.AF_MOBILE_USER_SS_FILE, &UniqueSysFilename, "", &ATTACHUSERFILE, &size * 1024);
The dynamic value can be stored in any setup or in a message catalog and pulled using below code, where 678 id default value in case message catalog 123,45 doesnt have this value.
&fsize = MsgGetText(123, 45, "678");
No comments:
Post a Comment