Sage CRM 7.2 - How to navigate to next page list screen (ASP page)

Hi there,

I'm trying to put 'List' on screen using ASP which it's working fine. However, when I tried to navigate to next page, there's an error came up. I understand that it should have some coding need to be done to set it up (this's general list which query data from view). I tried to search in sage community but couldn't find anything helpful.

Anyone please suggest how to do it? or there're other forums I missed?

Here's my function to general the list:

function createListBox()
{
var comp_CompanyID = CRM.GetContextInfo('Company', 'Comp_CompanyId');
var SQLQuery = "SELECT * FROM vProductSummary WHERE Comp_CompanyId = " + comp_CompanyID;
var ObjQuery = CRM.CreateQueryObj(SQLQuery);
ObjQuery.SelectSQL();

var ListContainer = CRM.GetBlock("list");
ListContainer.SelectSql = SQLQuery;
ListContainer.AddGridCol("ProductCode");
ListContainer.AddGridCol("QTY");
ListContainer.AddGridCol("Sell");

return ListContainer;
}

Thank you.

Regards,

Chayaporn

  • 0

    Hi,

    Try this out:


    <%
    var comp_CompanyID = CRM.GetContextInfo('Company', 'Comp_CompanyId');

    var SQLQuery = "SELECT * FROM vProductSummary where Comp_CompanyId = " + comp_CompanyID;
    var ObjQuery = CRM.CreateQueryObj(SQLQuery);
    ObjQuery.SelectSQL();

    // Make sure that this matches an actual ASP list name in the system
    var ListContainer = CRM.GetBlock("ProductList");
    ListContainer.ArgObj = ObjQuery;

    // I'd use column names here
    ListContainer.AddGridCol("prod_productcode");
    ListContainer.AddGridCol("prod_qty");
    ListContainer.AddGridCol("prod_sell");

    var container = CRM.GetBlock("container");
    container.AddBlock(ListContainer);
    CRM.AddContent(container.Execute(ObjQuery));

    Response.Write(CRM.GetPage());
    %>

    There's more info on using lists here:

    https://community.sagecrm.com/developerhelp/

    Thanks,

    Rob

  • 0

    Hi Rob,

    Thanks for your reply.

    Issue solve :)

    Cheers,