Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Tuned Listener
Posts: 5
Registered: ‎11-07-2012

Note Field Auto Population for Custom Entity 7.5.4

I've added Notes/History List to a custom entity 'CustProject'.  The customer wants the Contact, Account, Opportunity, and Project to automatically fill in when opened.  I've tried a couple of different things.  I added onto SetTACODefaultsFromEntityHistory with a "case 'ICustProject'" and modified FillForm() at the end to get the parent and set them based on that in the ActivityDetails.ascx.cs file.  Nither work.  Does anyone have any ideas?


I tried to see if I could find the "AddNote" javascript that is called on the button click because I figured I could add Paramaters to set the fields using that, but I couldn't find it. 



SetTACODefaultsFromEntityHistory Code:

case "ICustProject":
					found = true;
					ICustProject project = EntityFactory.GetById<ICustProject>(hist.EntityId.ToString());
					if (project !=  null)
						Activity.ICustProject = hist.EntityId.ToString();
						Activity.AccountId = project.AccountID;
						Activity.OpportunityId = project.OpportunityID;

 FillForm Code

object parent = this.GetParentEntity();
	if (parent is Sage.Entity.Interfaces.ICustProject){
		ICustProject project = (Sage.Entity.Interfaces.ICustProject)parent;
		Activity.ICustProject = project.Id.ToString();
		Activity.AccountId = project.AccountID;
		Activity.OpportunityId = project.OpportunityID;
		Activity.ContactId = project.ContactID;			


Does anybody have any other ideas to accomplish this?