I made a view updates but am still experiencing issues. First I created a sub folder in Custom Pages for the custom entity and copied my pages into it. I updated the references in CRM to point to the right locations for the asp pages. The sub folder has the same name as the entity.
I added the translations referenced as being needed by set context. My custom entity has the following translations:
Code: IdColumn
Family: OpportunitySpec
Type: Tags
Translation: opsp_opportunityspecid
Code: NameColumn
Family: OpportunitySpec
Type: Tags
Translation: opsp_reason
Code: OpportunitySpec
Family: OpportunitySpec
Type: Tags
Translation: OpportunitySpec
Code: SummaryPage
Family: OpportunitySpec
Type: Tags
Translation: OppoSpecSummary.asp
Code: OpportunitySpec
Family: RecentList
Type: Tags
Translation: OpportunitySpec
Code: OpportunitySpec
Family: Tables
Type: Tags
Translation: OpportunitySpec
My code for my OppoSpecLibrary.asp is below. There are two issues. The first is when I try to save the document I get an error message saying there is a type mismatch on the SetContext line. It is not picking up an Id value.
Second, if I hardcode the Id value for testing in the SetContext line and the Container.Execute line, the document is being saved to the company and opportunity which I do not want. I want it only to save to the custom entity which it isn't saving to at all. Also after I click new, I believe it is losing the id values because if I save or click cancel, I go back to the my library asp page, but if I click to the summary page, I again get the type mismatch issue because it can't find an id.
Please let me know what I am missing. Thanks.
<!-- #include file ="..\accpaccrm.js"-->
<%
var sURL=new String( Request.ServerVariables("URL")() + "?" + Request.QueryString );
eWare.GetTabs("OppoSpecTabs");
Container=eWare.GetBlock("container");
List=eWare.GetBlock("LibraryList");
List.prevURL=sURL;
var Id = new String(Request.Querystring("opsp_opportunityspecID"));
if (Id.toString() == 'undefined') {
Id = new String(Request.Querystring("Key58"));
}
eWare.SetContext("OpportunitySpec",Id);
Container.AddBlock(List);
Container.AddButton(eWare.Button("New", "new.gif", eWare.URL(343)+"&Key-1=58&PrevCustomURL="+sURL+"&E=OpportunitySpec"));
Container.DisplayButton(1)=false;
if( Id != '')
{
eWare.AddContent(Container.Execute("libr_opportunityspecid="+Id));
}
eWare.GetCustomEntityTopFrame("OpportunitySpec");
Response.Write(eWare.GetPage());
%>