cancel
Showing results for 
Search instead for 
Did you mean: 

Check the Attachment path before saving

Former Member
0 Kudos

Dear All,

I would like to kindly ask you to advise how it is possible to check File extension (the whole path) before the attachment is saved in CRM.

I was going to do that in ZL_GS_CM_ADDDOC_IMPL  EH_ONATTACH_BTN. (Component/View BS_CM/AddDoc).

I am able to check e.g. file name - which is free text field. However not sure how to identify the actual file path, or the type of the file. If the extension is e.g. .doc, .exe etc.

Could you please help?

Many thanks!

Honza

Accepted Solutions (1)

Accepted Solutions (1)

BGarcia
Active Contributor
0 Kudos

Hi Honza,

Try to check method GET_UPLOAD of class CL_GS_CM_ADDDOC_IMPL. It will show you how to get the information from your file by using a reference of type CL_THTMLB_FILEUPLOAD.

From there, I believe you'll be able to retrieve the information you need by checking corresponding class attributes.

See if this helps you a little more.

Kind regards,

Garcia

Former Member
0 Kudos

Excellent, thanks a lot this gave me good guidance I searched a bit more in the related methods and this is an easy option

lr_upload = get_upload ( ) and use function 'CRM_KW_SPLIT_ FILENAME' to get the information.

Answers (0)