• Bigperm
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

I've been doing a lot searching on the boards and the help files for information regarding adding something to the contact page. I wanted to add the ability for users to upload and store documents to a contact page. I work for a staffing agency and documentation are a major part as it's hospital related. So, we need to have a more detailed document storage then the "attachment and notes" section that comes standard with contacts.

While I've found a lot of information I must say it's been a little hard for me to understand it all. I thought I would start here. Perhaps even some helpful link on where to start reading more of this kind information.

I'm currently trying to add this Apex class:
public with sharing class FileUploadController {
	
	public Document document {
		get {
			if (document == null)
			document = new Document(); 
			return document;
		}
		set;
	}
	public PageReference upload() {
		document.AuthorId = UserInfo.getUserId();
		document.FolderId = UserInfo.getUserId(); // put it in running user's folder
		
		try {
			insert document;
			}catch (DMLException e) {
				ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading file'));
				return null;
			}finally {
				document.body = null; // clears the viewstate 
				document = new Document(); 
			}
			ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'File uploaded successfully')); 
			return null;
	}
}

 

 

When I try to test the class, it will say that it's skipped 17 of the 27 lines. I'm obviously a little new to this. What could I have done wrong?

I'm trying to create an upload button based on this helpful tool here: http://developer.force.com/cookbook/recipe/uploading-a-document-using-visualforce-and-a-custom-controller
What I hope to do in the end is add an upload button on a "contacts'" page.
Again, any help would be greatly appreciated.

Hello everyone,

 

I had a question, or one that may turn into a series of questions, I'm currently working for a staffing agency that deals with Hospitals. It is very important for the documentation of the nurses we staff to be up-to-date and also have queries running to insure that they stay that way. (Certain certs will become invalid after say 60 days, we can't place someone with invalid documentation etc.)

 

I haven't been able to find a way using the basic form of Salesforce to create this. I wanted to start the process of creating one using the tools found here. I was curious, and I'll be doing my own searches as well, if anyone had any information or even past board post on creating such a thing. I'm currently powering through some of the beginner documentation available, but if anyone could share any other links or bastions of knowledge that may be helpful.

 

The picture we have is: A imbedded app located in the contacts' profile that will show stored documentation. In this embedded app is a place to upload several different docs that the recruiters gather from the nurses (the person we staff). Next to the file is a date of when the cert will expire.


I would be extremely open to any suggestions or thoughts on this. Thank you so much. So far the Salesforce community has been amazing.

I'm currently trying to add this Apex class:
public with sharing class FileUploadController {
	
	public Document document {
		get {
			if (document == null)
			document = new Document(); 
			return document;
		}
		set;
	}
	public PageReference upload() {
		document.AuthorId = UserInfo.getUserId();
		document.FolderId = UserInfo.getUserId(); // put it in running user's folder
		
		try {
			insert document;
			}catch (DMLException e) {
				ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading file'));
				return null;
			}finally {
				document.body = null; // clears the viewstate 
				document = new Document(); 
			}
			ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'File uploaded successfully')); 
			return null;
	}
}

 

 

When I try to test the class, it will say that it's skipped 17 of the 27 lines. I'm obviously a little new to this. What could I have done wrong?

I'm trying to create an upload button based on this helpful tool here: http://developer.force.com/cookbook/recipe/uploading-a-document-using-visualforce-and-a-custom-controller
What I hope to do in the end is add an upload button on a "contacts'" page.
Again, any help would be greatly appreciated.

Hello everyone,

 

I had a question, or one that may turn into a series of questions, I'm currently working for a staffing agency that deals with Hospitals. It is very important for the documentation of the nurses we staff to be up-to-date and also have queries running to insure that they stay that way. (Certain certs will become invalid after say 60 days, we can't place someone with invalid documentation etc.)

 

I haven't been able to find a way using the basic form of Salesforce to create this. I wanted to start the process of creating one using the tools found here. I was curious, and I'll be doing my own searches as well, if anyone had any information or even past board post on creating such a thing. I'm currently powering through some of the beginner documentation available, but if anyone could share any other links or bastions of knowledge that may be helpful.

 

The picture we have is: A imbedded app located in the contacts' profile that will show stored documentation. In this embedded app is a place to upload several different docs that the recruiters gather from the nurses (the person we staff). Next to the file is a date of when the cert will expire.


I would be extremely open to any suggestions or thoughts on this. Thank you so much. So far the Salesforce community has been amazing.