I am launching an ASP page from a new tab on the Opportunity Entity. I use the code below but any HTML that is displayed is always about 10 lines too far down the screen. No sort of alignment seems to work. Any ideas?
<!-- #include file ="crmwizard.js" --><%CurrentOpportunityID=CRM.GetContextInfo("Opportunity", "Oppo_OpportunityId");var sURL=new String( Request.ServerVariables("URL")() + "?" + Request.QueryString );Response.Write(CRM.GetPage('Opportunity'));%>MY CONTENT LANDS TOO FAR DOWN!
Instead of adding the HTML just at the bottom, which will then only write after CRM has added all the padding, why don't you use AddContent instead.
I modified the page so it tests better on my side, but I think you get the idea. Adding a container block also adds the buttons, however you can remove those if you wish by using the DisplayButton property -> https://help.sagecrm.com/on_premise/en/2018R1/dev/Content/Developer/ASP%20Object%20Reference/CRMContainerBlock%20Object/AS_CRMCBDisplayButton.htm?Highlight=button and setting it to false, but in actual fact you can even leave out the container completely if you want to "draw" the page yourself.
<!-- #include file ="crmwizard.js" --><%container=CRM.GetBlock("container");CRM.AddContent(container.Execute());
//this line instead of the one belowCRM.AddContent("MY CONTENT LANDS TOO FAR DOWN!");Response.Write(CRM.GetPage());%>MY CONTENT LANDS TOO FAR DOWN!
TL;DR - try using CRM.AddContent instead of just plain HTML out of the code tags
If this solves your issue, please don't forget to mark this as an answer.
Thanks - That works.