This topic contains 3 replies, has 0 voices, and was last updated by Carlo Ibarra 14 years, 10 months ago.

  • Author
    Posts
  • #4344

    mikespencer

    Hello,

    I’ve deployed a suitelet with SuiteBundler.

    My problem is I have a bunch of hosted pages that reference the Suitelets.

    Whenever I deploy I have to find all instances of each suitelet in the hosted pages and replace them with the new url.

    I realize the search and replace part isn’t going to go away but it would be really great to be able to reference the suitelets using their text id rather than their numeric id and deployment id

    e.g. https://forms…./scriptlet.nl?scrip…ymysuiteletid&…

    rather than

    e.g. https://forms…./scriptlet.nl?script=7&deploy=1&…

    Has anyone found a back door syntax for this?
    This is a cached copy. Click here to see the original post.

  • #4345

    mikespencer

    posting altered my desired url syntax. parameter should be

    scriptid=customdeploymysuiteletid

  • #4346

    iqureshi

    RE: Suitelet Ids

    Hello

    I believe Suitelets that are not externally hosted can be referenced by their named Ids (script and deployment)

    Suitelets that are externally hosted need to be referenced by their Netsuite internalIds.

    Thanks

  • #4347

    Carlo Ibarra

    RE: Suitelet Ids

    Hi mikespencer,

    If there are significant number of suitelets being referenced from the hosted pages, you could create a broker suitelet that will accept the text scritpid and text deploymentid as parameters, and will redirect the response to the target suitelet.

    This does not solve the problem of referencing an external suitelet by its internal id but, at least, you would only need to find and replace just one suitelet id.

    i.e. (broker suitelet)

    PHP Code:

    function main(request, response)

    {

        var scriptId = request.getParameter(“scriptid”);

        var deploymentId = request.getParameter(“deploymentid”);

        var allParams = request.getAllParameters();

        

        var requestParams = {};

        for (var i in allParams)

        {

            if (i != “scriptid” && i != “deploymentid”)

                requestParams[i] = allParams[i];

        }

        response.sendRedirect(“SUITELET”, scriptId, deploymentId, null, requestParams);

    }

You must be logged in to reply to this topic.