You need to sign in to do that
Don't have an account?
Jack Rose 1
Uploaded Documents Name Set by Picklist Value
Hi All,
I have a VF page that is used by customers to upload documents to us, which create and attach themselves to a case.
The name of the attachment is currently being set by the controller.
I want the document name to include the value from a picklist on the page (Type_of_Document__c) however the the name is currently showing the field API name.
Any thoughts on how to fix this?
I have a VF page that is used by customers to upload documents to us, which create and attach themselves to a case.
The name of the attachment is currently being set by the controller.
I want the document name to include the value from a picklist on the page (Type_of_Document__c) however the the name is currently showing the field API name.
Any thoughts on how to fix this?
insert objcase; System.debug('@@@@@objcase' +objcase); System.debug('@@@@@fileBody'+fileBody); myAttachment = new Attachment(); Integer i=0; myAttachment.clear(); myAttachment.Body = fileBody; myAttachment.Name = 'Type_of_Document__c'+objcase.id+'.jpeg' ; myAttachment.ParentId = objcase.id; insert myAttachment;
Please use above code. If helpfull for you please choose my ans as the best ans.
Thanks,
Harshit Garg
All Answers
Please use above code. If helpfull for you please choose my ans as the best ans.
Thanks,
Harshit Garg