You need to sign in to do that
Don't have an account?
Jack Rose 1
create a case from an uploaded file
Hi,
Is anyone aware if it is possible to use a visualforce page, a a web form, to create a case and upload a file to the case at the same time?
Is anyone aware if it is possible to use a visualforce page, a a web form, to create a case and upload a file to the case at the same time?
Please use updated code below.
Class:
Pages:
Thanks,
Harshit Garg
All Answers
As i understood about your requirment
i am sending vf page and class i feel this suits your requirement.
VF Page:
Apex Class:
if you get any doubts in this please feel free to ask me
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Harshit Garg
First of all thank you for the help. I have attempted to use the above code with a couple of changes;
I have removed the Status, Type & Origin fields from the VF Page.
I have added into the controller the setting of the record type and origin and a page redirect.
The code is creating a case but the attachment doesn't appear on the case.
Any thoughts?
Please edit your layout and drag the attachment and drop in the related list.
Could you send me your page layout screenshot? But from the above solution, you can do that properly.
Thanks,
Harshit Garg
I have the attachment and files both displayed as related lists but they are still not showing. Here is the Code I have entered based on what you have suggested.
VF -
Controller -
Please use updated code below.
Class:
Pages:
Thanks,
Harshit Garg
I have added the visualforce page to a site and I'm now getting an Authorisation Required when submitting the form. Any Ideas?
If I am not wrong you have a profile guest user. Please give the access of your VF page and class for that guest user profile.
Thanks,
Harshit Garg
Please can you let me know how I would do that? I have created to other VF pages on the site and they seem ok. It only seems to cause an issue when i click save.
Please use that above class again..it will redirect on same page same as you want.
Thanks,
Harsh
1 final question, are you able to help with the file naming that i mentioned earlier?
I am unable to understand what you are saying.. Could you explain again in detail?
Thanks,
Harshit Garg