﻿<html>
<head>
</head>
<body>
   

    <script src="ClientGlobalContext.js.aspx"></script>

    <script src="north52_/javascript/wijmo/jquery" type="text/javascript"></script>
    <script src="north52_/javascript/wijmo/jqueryui" type="text/javascript"></script>
    <script src="north52_/javascript/JSON2" type="text/javascript"></script>
    <script src="north52_/javascript/sdk.rest" type="text/javascript"></script>
    <script src="north52_/Javascript/sdk.metadata.js" type="text/javascript"></script>
    <script src="north52_/javascript/north52.htmlwebresource.helper" type="text/javascript"></script>
    <script src="north52_/javascript/north52_dialog_helper" type="text/javascript"></script>
    <script src="north52_/javascript/wijmo/open" type="text/javascript"></script>
    <script src="north52_/javascript/wijmo/pro" type="text/javascript"></script>
    <script src="north52_/javascript/formulaeditor" type="text/javascript"></script>
    <script src="north52_/javascript/wijmo/spreadjs" type="text/javascript"></script>
    <script src="north52_/javascript/codemirror" type="text/javascript"></script>
    <script src="north52_/javascript/sdk_jquery" type="text/javascript" ></script>

    <link href="north52_/css/wijmo/spreadjs" rel="stylesheet" type="text/css">
    <link href="north52_/css/wijmo/core" rel="stylesheet" type="text/css">
    <link href="north52_/css/wijmo/aristo" rel="stylesheet" type="text/css">
    <link href="north52_/css/formulaeditor" rel="stylesheet" type="text/css">
    <link href="north52_/css/codemirror" rel="stylesheet" type="text/css">


    <style type="text/css">
        .CodeMirror {
            border: 1px solid silver;
            margin-bottom: 1em;
            width: 99.7%;
            height: 91.5%;
            top: -1px;
        }
        .styled-background { background-color: #ff7; }
    </style>

    <script id="modecode">

        CodeMirror.defineSimpleMode("simplemode", {

            start: [


            
  

    { regex: /"(?:[^\\]|\\.)*?"/, token: "string" },
    { regex: /(?:addcustomview|adddays|addhours|addminutes|addmonths|addprefilterlookup|addseconds|addyears|alert|alertclear|appendformat|autonumber|associateentities|avg|base64decode|base64encode|between|callrestapi|case|cdate|cdecimal|cdecimaltoint32|cdouble|cfloattoint32|chainfunctions|cint|cint32|cint64|cjsonarraytoentitycollection|clear|clearattribute|clearcontrolnotification|clearfields|clearformnotification|clone|cnodetoxml|collapsetabs|compress|confirmdialog|contains|containsdata|coptionsetvalue|count|countcharacters|createattachment|createdate|createhtmllist|createhtmltable|createhtmltwocolumn|createjarray|createjarraychildren|createjobject|createjproperty|createnote|createnoteifexists|createrecord|createxmlattribute|createxmlattributes|createxmlchildren|createxmldeclaration|createxmlelement|createxmlrootattribute|createxmlrootnode|currentrecord|currentrecordinnerloop|currentrecordouterloop|dameraulevenshteindistance|datediff|datediffdescription|datediffelapsed|datediffelapseddescription|decisiontable|decompress|default|deleterecord|deleterecordifexists|deleterecordsfd|depth|diffdays|diffmonths|diffworkingdays|diffyears|disablefields|disassociateentities|displaymultiplerecords|doesnotcontaindata|doloop|doloopindex|dolooptotal|enablefields|endswith|executeaction|executedialog|executeworkflow|expandtabs|findavg|findavgfd|findcount|findcountfd|findeccount|findentitycollectioncount|findjarrayitem|findlistvalues|findmax|findmaxfd|findmin|findminfd|findrecords|findrecordsfd|findrecordsfetchxml|findrecordsvalue|findrecordvalue|findsum|findsumfd|findvalue|findvalueex|findvaluefd|findxmlitem|firstrecord|firstwords|foreachrecord|foreachrecorddouble|gcd|generatedoc|generateguid|generateinvoicefromopportunity|generatequotefromopportunity|generatesalesorderfromopportunity|geocodebing|getassociationrelatedentityreferenceid|getassociationrelationshipname|getattributedisplayname|getcurrencysymbol|getday|getdateonly|getdayofweekname|getdayofweeknumber|getdaysinmonth|getentityname|getexchangerate|getfetchxml|getfirstdayofmonth|getfirstdayofweek|getfirstdayofquarter|getlastdayofmonth|getlastdayofquarter|getlayoutxml|getmonth|getnextworkingday|getnextworkingtime|getoptionsetname|getparamfromurl|getpartylistcount|getpartylistitemid|getpartylistitemname|getpartylistitemtype|getuserroles|getuserteams|getvar|getvarjsonec|getvarjsonvalue|getvarxpathec|getvarxpathvalue|getweek|getweekelapsed|getyear|hidefields|hidelefthandnavitems|hidesections|hidetabs|iftrue|indexof|insert|isempty|isleapyear|isuserinsecurityroles|isworkingday|lastrecord|lcm|left|let|letreturn|levenshteindistance|levenshteindistancefast|linkdialogurl|linkhyperlinkurl|linkrawurl|localdate|localdatetime|localtimefromutctime|longestcommonsubsequence|loopuntiltrue|lower|matchlist|max|maxof|md5|mergerecords|min|minof|multipleclientside|padleft|padright|priorvalue|round|random|recordindex|recordshare|recordtotal|recordunshare|recordunshareall|refreshform|refreshsubgrid|refreshwebresource|regexismatch|regexmatch|regexreplace|remove|removeattribute|removeprefilterlookup|replace|reverse|right|selectform|sendemail|setattribute|setattributeaction|setattributeactionlookup|setattributecustomer|setattributelookup|setattributepartylist|setattributestatus|setauthenticationoauth|setauthenticationoauth2|setclientsidedate|setclientsidefield|setclientsidelookup|setcolumnorder|setcontrolnotification|setcurrencysymbol|setcustomerlookup|setdefaultview|setfindand|setfindselect|setfocus|setformnotification|setiframe|setlookup|setnotrequiredfields|setownerteam|setowneruser|setparams|setpartylist|setpartylistcombined|setpicklistvalues|setreference|setregardinglookup|setrequestactionfail|setrequestactionpass|setrequestauthenticationbasic|setrequestauthenticationnone|setrequestbaseurl|setrequestdetails|setrequestexpected|setrequestfile|setrequestfiles|setrequestheaders|setrequestparams|setrequestresource|setrequiredfields|setresponseprefix|setstate|settwocolumnorder|setvar|setwatermarkstring|sha1|sharepointcreatefile|sharepointcreatefolder|sharepointcreatesite|sharepointdeletefile|sharepointfinddocumentsbyfetchxml|sharepointgetfile|sharepointgetitemmetadata|sharepointupdateitemmetadata|showfields|showlefthandnavitems|showsections|showtabs|sift3|similarity|slice|smartflow|smartflowreturn|split|startschedule|startswith|stopschedule|capitalize|stringformat|stringformatgd|metaphone3|totitlecase|trim|striphtml|substring|sum|then|throwerror|tostring|transformentity|translate|updateactivitypartybulk|updatecreaterecord|updaterecord|updaterecordifexists|upper|utcdate|utcdatetime|utctimefromlocaltime|when|whoami|whoaminame|xcacheaddcalculatedfieldlocal|xcacheget|xcachecalculatelocal|xcachefilterlocal|xcachegetglobal|xcachegetlocal|xcacheloadlocal|getactionoutputparameter|in|if|break|setclientsidefieldappend|abs|ceiling|exp|floor|gcd|lcm|maxof|minof|sign|sqrt|truncate|findrecordsaudithtml|doesuserhaveprivilege)\b/i, token: "keyword" },
    { regex: /true|false|null|undefined/, token: "atom" },
    { regex: /0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i, token: "number" },
    { regex: /\/\/.*/, token: "comment" },
    { regex: /'(.*?)'/, token: "singlequote" },
    { regex: /\[(.*?)\]/, token: "dynamicvalue" },
    { regex: /\/\*/, token: "comment", next: "comment" },
    { regex: /[-+\/*=<>!]+/, token: "operator" },
    { regex: /[\{\[\(]/, indent: true },
    { regex: /[\}\]\)]/, dedent: true },
    { regex: /[a-z$][\w$]*/, token: "variable" }

  ],

            comment: [
    { regex: /.*?\*\//, token: "comment", next: "start" },
    { regex: /.*/, token: "comment" }
  ],
            meta: {
                dontIndentStates: ["comment"],
                lineComment: "//"
            }
        });
    </script>

    <script id="scriptInit" type="text/javascript">

        $(document).ready(function () {

            var sc = document.getElementById("modecode");
            var code = document.getElementById("formula");
            var editorFormula = CodeMirror(code, { mode: "simplemode", lineWrapping: true, matchBrackets: true });


            $("#splitter").wijsplitter({ orientation: "vertical", fullSplit: true, splitterDistance: 425, sized: function () { North52.FormulaEditor.ResizeSS(); }, collapsed: function () { North52.FormulaEditor.ResizeSS(); }, expanded: function () { North52.FormulaEditor.ResizeSS(); } });
            $("#tabsalpha").wijtabs();
            $("#treefunctions").wijtree({ autoCollapse: true });
            $("#treeexplore").wijtree({ autoCollapse: true, showCheckBoxes: true, nodeExpanding: function (events, data) { North52.FormulaEditor.ExpandTreeExplore(events, data); } });
            $("#treesource").wijtree({ autoCollapse: true });
            $("#treerelated").wijtree({ autoCollapse: true, nodeExpanding: function (events, data) { North52.FormulaEditor.LoadRelated(events, data); } });
            $("#treeforms").wijtree({ autoCollapse: true, nodeExpanding: function (events, data) { North52.FormulaEditor.LoadForms(events, data); } });
            $("#treedetail").wijtree({ autoCollapse: true, nodeExpanding: function (events, data) { North52.FormulaEditor.LoadFormulaDetails(events, data); } });
            $("#targetContainer [title]").wijtooltip({ showDelay: 1200, hideDelay: 1000 });
            $("#ribbon").wijribbon();
            $("#exploregenerator").wijcombobox({ isEditable: false });
            $("#treexcache").wijtree({ autoCollapse: true, nodeExpanding: function (events, data) { North52.FormulaEditor.LoadxCache(events, data); } });
            $("#treecalculations").wijtree({ autoCollapse: true });
            $("#treeactions").wijtree({ autoCollapse: true });


            $("#dialogFunctionWizard").wijdialog({
                autoOpen: false,
                contentUrl: 'north52_html_functionwizard',
                resizable: false,
                height: 325,
                width: 375,
                modal: false,
                buttons: {
                    "Generate": function () {
                        $(this).wijdialog("close");
                        setTimeout(function () { North52.FormulaEditor.InsertTextAtCursor(North52.FormulaEditor.RetrieveCacheFunction(), North52.FormulaEditor.RetrieveCacheFunction()); }, 1500);
                        
                    },
                    Cancel: function () {
                        $(this).wijdialog("close");
                    }
                }

            });

            $("#dialogExecuteCommand").wijdialog({
                autoOpen: false,
                contentUrl: 'north52_html_executecommand',
                resizable: false,
                height: 300,
                width: 350,
                modal: false,
                buttons: {
                    "Close": function () {
                        $(this).wijdialog("close");


                    }
                }

            });


            $("#flyoutmenu").removeClass("ui-helper-hidden-accessible");
            localStorage.removeItem("n52_firstClick");

            var formulaDescription = parent.Xrm.Page.data.entity.attributes.get("north52_formuladescription").getValue();

            North52.FormulaEditor.InsertTextAtCursor(formulaDescription, formulaDescription);

            $('#treecalculations').hide();
            $('#treeactions').hide();


            if ((formulaDescription != null) && (formulaDescription.length > 0) && (formulaDescription.indexOf("8.40.20151.5") > 0))
                North52.FormulaEditor.ToggleDecisionTableMode();


        });



        $(function () {


            $("#treesource").wijtree({
                nodeClick: function (e, data) {

                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.params, this.id, data.options.toolTip);
                }
            });

            $("#treerelated").wijtree({
                nodeClick: function (e, data) {

                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.params);
                }

            });





            $("#treedetail").wijtree({
                nodeClick: function (e, data) {
                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.params);
                }
            });

            $("#treeexplore").wijtree({
                nodeClick: function (e, data) {
                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.params);
                }
            });


            $("#treefunctions").wijtree({
                nodeClick: function (e, data) {
                    North52.FormulaEditor.InsertTextAtCursor(data._text, data._text);
                }
            });


            $("#treeforms").wijtree({
                nodeClick: function (e, data) {
                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.params);
                }
            });

            $("#treecalculations").wijtree({
                nodeClick: function (e, data) {

                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.params, this.id, data.options.toolTip);
                }
            });

            $("#treeactions").wijtree({
                nodeClick: function (e, data) {

                    North52.FormulaEditor.InsertTextAtCursor(data.options.text, data.options.text, this.id, data.options.toolTip);
                }
            });

            $("#treexcache").wijtree({
                nodeClick: function (e, data) {

                    var name = data.options.text;
                    var value = data.options.params;

                    if (($('#formula').is(":visible") == true) && (value.substring(0, 2) == "{{"))
                        value = String.format("xCacheGetGlobal('{0}')", value.replace("{{", "").replace("}}", ""));

                    North52.FormulaEditor.InsertTextAtCursor(name, value);
                }
            });


            $("#flyoutmenu").wijmenu({
                ensureSubmenuOnBody: true,
                trigger: ".wijmo-wijmenu-item",
                triggerEvent: "click",
                select: function (e, data) {

                    if ((data.item.options.text == "Snippets") || (data.item.options.text == "Operators") || (data.item.options.text == "Commands")) return;


                    if (data.item.options.text == 'Case')
                        North52.FormulaEditor.Case();
                    else if (data.item.options.text == 'If')
                        North52.FormulaEditor.If();
                    else if (data.item.options.text == 'IfTrue')
                        North52.FormulaEditor.IfTrue();
                    else if (data.item.options.text == 'DoLoop')
                        North52.FormulaEditor.DoLoop();
                    else if (data.item.options.text == 'ForEachRecord')
                        North52.FormulaEditor.ForEachRecord();
                    else if (data.item.options.text == 'SmartFlow')
                        North52.FormulaEditor.SmartFlow();
                    else if (data.item.options.text == 'NoOp')
                        North52.FormulaEditor.NoOp();
                    else if (data.item.options.text == 'Comment')
                        North52.FormulaEditor.Comment();
                    else if (data.item.options.text == 'Toggle Editor')
                        North52.FormulaEditor.ToggleDecisionTableMode();
                    else
                        North52.FormulaEditor.InsertTextAtCursor(data.item.options.text, data.item.options.text);

                }
            });

            $("#contextMenu").wijmenu({
                trigger: "#ss",
                triggerEvent: "rtclick",
                orientation: "vertical",
                select: function (e, data) {
                    var options = data.item.options;
                    var spread = $('#ss').data('spread');
                    var sheet = spread.getActiveSheet();
                    var spreadNS = GcSpread.Sheets;

                    switch (options.text.trim()) {
                        case "Cut":
                            GcSpread.Sheets.SpreadActions.cut.call(sheet);
                            break;
                        case "Copy":
                            GcSpread.Sheets.SpreadActions.copy.call(sheet);
                            break;
                        case "Paste":
                            GcSpread.Sheets.SpreadActions.paste.call(sheet);
                            break;
                        case "Insert Row":
                            sheet.addRows(sheet.getActiveRowIndex(), 1);
                            break;
                        case "Insert Condition":
                            sheet.addColumns(0, 1);
                            sheet.getCell(0, 0).value("Condition");
                            sheet.getCell(0, 0).backColor("#ffdf80");
                            sheet.getCell(0, 0).font("italic 9pt arial");

                            sheet.getCell(1, 0).font("bold 10pt arial");
                            sheet.getCell(1, 0).backColor("#ffdf80");
                            sheet.getCell(1, 0).wordWrap(true);
                            sheet.getCell(2, 0).backColor("#ffdf80");

                            sheet.setColumnWidth(0, 120.0, GcSpread.Sheets.SheetArea.viewport);
                            break;
                        case "Insert Action":
                            for (var x = 0; x <= 100; x++) {
                                var tmpCurrentValue = String(sheet.getValue(0, x));
                                if ((tmpCurrentValue == null) || (tmpCurrentValue == "null")) {
                                    sheet.addColumns(x, 1);
                                    sheet.getCell(0, x).value("Action");
                                    sheet.getCell(0, x).backColor("#80c784");
                                    sheet.getCell(0, x).font("italic 9pt arial");

                                    sheet.getCell(1, x).font("bold 10pt arial");
                                    sheet.getCell(1, x).backColor("#80c784");
                                    sheet.getCell(1, x).wordWrap(true);
                                    sheet.getCell(2, x).backColor("#80c784");


                                    sheet.setColumnWidth(x, 120.0, GcSpread.Sheets.SheetArea.viewport);
                                    break;
                                }
                            }
                            break;
                        case "Toggle Formula Box":
                            North52.FormulaEditor.ToggleFormulaBox();
                            break;
                        case "Delete Row":
                            sheet.deleteRows(sheet.getActiveRowIndex(), 1);
                            break;
                        case "Delete Column":
                            sheet.deleteColumns(sheet.getActiveColumnIndex(), 1);
                            break;
                        case "Toggle Advanced Mode":
                            North52.FormulaEditor.ToggleDTAdvancedMode();
                            break;
                        case "Exit on First Match":
                            if (spread.getSheet(3).getValue(1, 0) == "false")
                                spread.getSheet(3).getCell(1, 0).value("true");
                            else
                                spread.getSheet(3).getCell(1, 0).value("false");
                            break;
                        default:
                            break;
                    }
                }
            });


            $("#contextMenu").wijmenu({
                showing: function (event, item) {

                    if (localStorage.getItem("n52_firstClick") === null) {
                        localStorage.setItem("n52_firstClick", "n52_firstClick");
                        return false;
                    }

                }
            });

            $("#ss").mouseup(function (e) {
                if (e.button !== 2) {
                    $("#contextMenu").wijmenu("deactivate");
                    $("#contextMenu").wijmenu("hideAllMenus");

                }
            });

            $("canvas").mousedown(function (e) {
                $("#contextMenu").wijmenu("deactivate");
                $("#contextMenu").wijmenu("hideAllMenus", e);

            });
            $("#ss").bind('contextmenu', function (e) {
                $("#contextMenu").wijmenu("option", "position", { of: e });
                return false;
            });


            $("#tree").wijtree({
                allowEdit: false
            });


            $("#ribbon").wijribbon({
                click: function (e, cmd) {

                    if (cmd.commandName == 'btnValidate')
                        North52.FormulaEditor.Validate();
                    else if (cmd.commandName == 'btnClear')
                        North52.FormulaEditor.Clear();
                    else if (cmd.commandName == 'btnRunCommand')
                        North52.FormulaEditor.RunCommand();
                    else if (cmd.commandName == 'btnFunctionWizard')
                        e = e;

                }
            });


            $("#txtFind").keyup(function (event) {
                if (event.keyCode == 13) {
                    var textToFind = $("#txtFind").val().toLowerCase(); 
                    North52.FormulaEditor.Search('#treefunctions', textToFind);
                }

                if (!this.value) {
                    North52.FormulaEditor.SearchClear('#treefunctions');
                }
            });

            $("#txtFindSource").keyup(function (event) {

                if (event.keyCode == 13) {
                  
                    var textToFind = $("#txtFindSource").val().toLowerCase();
                    North52.FormulaEditor.Search('#treesource', textToFind);
                    North52.FormulaEditor.Search('#treerelated', textToFind);
                    North52.FormulaEditor.Search('#treeforms', textToFind);
                    North52.FormulaEditor.Search('#treedetail', textToFind);
                    North52.FormulaEditor.Search('#treecalculations', textToFind);
                    North52.FormulaEditor.Search('#treexcache', textToFind);
                    North52.FormulaEditor.Search('#treeactions', textToFind);


                }

                if (!this.value) {
                    North52.FormulaEditor.SearchClear('#treesource');
                    North52.FormulaEditor.SearchClear('#treerelated');
                    North52.FormulaEditor.SearchClear('#treeforms');
                    North52.FormulaEditor.SearchClear('#treedetail');
                    North52.FormulaEditor.SearchClear('#treecalculations');
                    North52.FormulaEditor.SearchClear('#treexcache');
                    North52.FormulaEditor.SearchClear('#treeactions');

                }
            });

            $("#txtFindExplore").keyup(function (event) {

                if (event.keyCode == 13) {
                    var nodes = $("#treeexplore").wijtree("getNodes");
                    nodes[0].expand();

                    var textToFind = $("#txtFindExplore").val().toLowerCase();
                    North52.FormulaEditor.Search('#treeexplore', textToFind);
                }

                if (!this.value) {
                    North52.FormulaEditor.SearchClear('#treeexplore');
                }
            });


            $("#flyoutmenu").parent().parent().css({
                "padding": "0px"
            });


        });


        function Show(entity) {

            North52.FormulaEditor.LoadSource(entity);

            North52.FormulaEditor.ClearNodes("#treerelated");
            var node = $("#treerelated").wijtree("findNodeByText", 'Related');
            node.element.wijtreenode("add", { text: "Loading..." }, 0);
            node.element.wijtreenode("collapse");

            North52.FormulaEditor.ClearNodes("#treeforms");
            node = $("#treeforms").wijtree("findNodeByText", 'Forms');
            node.element.wijtreenode("add", { text: "Loading..." }, 0);
            node.element.wijtreenode("collapse");

        };

        function SaveFormula() {


            if ($('#formula').is(":visible") == true) {

                parent.Xrm.Page.data.entity.attributes.get("north52_formuladescription").setValue($('.CodeMirror')[0].CodeMirror.getValue());
            }
            else {

                var spread = $('#ss').data('spread');
                var jsonStr = JSON.stringify(spread.toJSON());
                var generateFormula = North52.FormulaEditor.DTGenerate() + '\n\n\n' + '/*' + jsonStr + '*/';

                $('.CodeMirror')[0].CodeMirror.setValue(generateFormula);

                parent.Xrm.Page.data.entity.attributes.get("north52_formuladescription").setValue(generateFormula);


            }

        };

        function BuildTrees(sheetName) {
            var spread = $('#ss').data('spread');
            var sheet = spread.getSheetFromName(sheetName);

            if (sheetName == "Calculations") {
                if (sheet.getValue(1, 0) != null) North52.FormulaEditor.ClearNodes("#treecalculations");

                for (var i = 1; i <= 100; i++) {

                    if (sheet.getValue(i, 0) == null) break;
                    if (sheet.getValue(i, 1) == null) break;

                    var calcName = sheet.getValue(i, 0);
                    var calcValue = String.format("GetVar('{0}')", calcName);

                    var node = $("#treecalculations").wijtree("findNodeByText", 'Calculations');
                    node.element.wijtreenode("add", { text: calcName, params: calcValue }, 0);
                }
            }
            else if (sheetName == "Actions") {
                if (sheet.getValue(1, 0) != null) North52.FormulaEditor.ClearNodes("#treeactions");


                for (var i = 1; i <= 100; i++) {

                    if (sheet.getValue(i, 0) == null) break;
                    if (sheet.getValue(i, 1) == null) break;

                    var calcName = sheet.getValue(i, 0);
                    var calcValue = "" + i + "";

                    var nodeActions = $("#treeactions").wijtree("findNodeByText", 'Actions');
                    nodeActions.element.wijtreenode("add", { text: calcName, params: calcValue }, 0);
                }
            }
        }

        function selectionChangedBuildTrees(sender, args) {
            BuildTrees(args.sheetName);
        }

    </script>

    <title></title>
    <div class="container" id="n52Container">
        <div id="splitter">
            <div id="panel1alpha">
                <!---Panel1--->
                <div id="tabsalpha">
                    <ul>
                        <li><a class="ui-link" href="#tabs-functions">Functions</a></li>
                        <li><a class="ui-link" href="#tabs-source">Source</a></li>
                        <li><a class="ui-link" href="#tabs-explore">Explore</a></li>
                    </ul>


                    
                <div id="tabs-functions">
                  <div id="targetContainer">     

                   <div id="searchContainer" style="padding: 12px 14px 0px;">
                                <input id="txtFind" style="border:1px solid gray; width: 100%;" type="text" placeholder="Search functions..."  />
                   </div>
                   
                   <ul id="treefunctions"> 
                    <li class="folder"><a class="ui-link"><span>ClientSide</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Provides the ability to add a custom view to a lookup control. <br></br>  AddCustomView('preferredsystemuserid', 'systemuser', 'Only users in Canada BU', GetFetchXML('CanadaUsers'), GetLayoutXML('CanadaUsers'), false)">AddCustomView('controlname', 'entitylogicalname', 'nameofview', 'FetchXml', 'LayoutXml', 'isDefault')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Presents a pop-up alert to the user. <br></br>  Alert('Enter any message here.')">Alert('message')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Adds a pre filter lookup to the controlid. <br></br> AddPreFilterLookup('parentaccountid', 'ab5', 'fetchxml_fragment', 'account')">AddPreFilterLookup('controlid', 'formulashortcode', 'filter', 'entityfilter')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Remove a pre filter lookup to the controlid. <br></br>  RemovePreFilterLookup('parentaccountid')">RemovePreFilterLookup('controlid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Presents a pop-up alert to the user and clears the listed fields.<br></br>   AlertClear('Enter any message here.', 'description')">AlertClear('message', 'fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Clears the contents of any fields.<br></br>   ClearFields('name', 'description')">ClearFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Clears the form notification.<br></br> ClearFormNotification('uniqueID') <br></br>Updated Entities for CRM 2013 Only.">ClearFormNotification('uniqueID')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Clears the control notification.<br></br> ClearControlNotification('fieldname') <br></br>Updated Entities for CRM 2013 Only.">ClearControlNotification('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Collapses a tab.<br></br>   CollapseTabs('tab1', 'tab2')">CollapseTabs('tab')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Disables one or more fields on a form. <br></br>  DisableFields('name', 'description') <br></br>  DisableFields('*')">DisableFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Enables one or more fields on a form.<br></br>   EnableFields('name', 'description') <br></br>  EnableFields('*')">EnableFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Expands a tab.<br></br>   ExpandTabs('tab1', 'tab2')">ExpandTabs('tab')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Executes a dialog.<br></br>   ExecuteDialog('Onboard Client')">ExecuteDialog('dialogname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Executes a workflow.<br></br>   ExecuteWorkflow('Onboard Prospect', '873489c-992f-22db-8454-0800255c9a55')">ExecuteWorkflow('workflowname', 'recordguid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Hides one or more fields on a form. <br></br>  HideFields('name', 'description')">HideFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Hides one or more left hand navigation items.<br></br> Note: You need to refer to the nav item id of the link, so use F12 developer tools in IE to get this.<br></br>    HideLeftHandNavItems('navcontacts', 'navorders')">HideLeftHandNavItems('navname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Hides one or more sections on a form. <br></br>  HideSections('general.notes', 'general.contact')">HideSections('tabname.sectionname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Hides one or more tabs on a form.<br></br>   HideTabs('general', 'administrative')">HideTabs('tabname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Executes multiple client side actions.<br></br>   MultipleClientSide(SetClientSideField('lastname', 'Test'), DisableFields('firstname', 'lastname'), ClearFields('firstname'))">MultipleClientSide('action1', 'action2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Refresh the form. Add true to save any data otherwise false<br></br>   RefreshForm('true')">RefreshForm('boolean')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Refresh a subgrid.<br></br>   RefreshSubGrid('gridname')">RefreshSubGrid('gridname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Refresh a web-resource. <br></br>  RefreshWebResource('IFRAME_webpage')">RefreshWebResource('webresource')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Selects a given form.<br></br>   SelectForm('0')">SelectForm('formid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Set a field on the client side. <br></br>  SetClientSideField('lastname', 'Gates')">SetClientSideField('fieldname', 'fieldvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Set a field to the data it has plus some new data. <br></br>  SetClientSideFieldAppend('description', ' Hello from North52')">SetClientSideFieldAppend('fieldname', 'datatoappend')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets a control notification.<br></br>  SetControlNotification('accountnumber', 'Please enter an account number') <br></br>Updated Entities for CRM 2013 Only.">SetControlNotification('fieldname', 'message' )</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Set a default view.   SetDefaultView('customerid', '630dd379c-ee2f-11db-8314-0800200c9a5')">SetDefaultView('lookup', 'viewid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the form notification.<br></br> The level parameters are ERROR, WARNING, INFO.   SetFormNotification('Account over due', 'WARNING, '1') <br></br>Updated Entities for CRM 2013 Only.">SetFormNotification('message', 'level', 'uniqueID')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Set the focus on a field.<br></br>   SetFocus('description')">SetFocus('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Set an iframe. <br></br>  SetIFrame('IFRAME_web', 'http://www.microsoft.com')">SetIFrame('iframecontrol', 'websiteaddress')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets one or more fields to be required. <br></br>  SetRequiredFields('name', 'description')">SetRequiredFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets one or more fields to be not required.<br></br>   SetNotRequiredFields('name', 'description')">SetNotRequiredFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the available picklist values.<br></br> Primarily used to filter picklist when they are dependent on another field.<br></br> The first parameter is the optionset field name, the second is a boolean which if true will include an empty option set value. <br>For records with no saved optionset value the first item in the list will be the default if the empty parameter does not exist.    <br></br>Then you can pass in a list of optionset values, only these will display in the picklist. <br></br>   SetPicklistValues('address1_shippingmethodcode', 'true', 1,2,3)">SetPicklistValues('field', 'emptyvalue', 'optionsetvalue', 'optionsetvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Shows one or more fields on a form. <br></br>  ShowFields('name', 'description')">ShowFields('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Shows one or more left hand navigation items.<br></br> Note: You need to refer to the nav item id of the link, so use F12 developer tools in IE to get this.<br></br>   ShowLeftHandNavItems('navcontacts', 'navorders')">ShowLeftHandNavItems('navname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Shows one or more sections on a form.<br></br>   ShowSections('general.notes', 'general.contact')">ShowSections('tabname.sectionname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Shows one or more tabs on a form. <br></br>  ShowTabs('general', 'administrative')">ShowTabs('tabname')</span></a></li>                          
                        </ul> 
                    </li> 
                    <li class="folder"><a class="ui-link"><span>Conversion</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Returns a decimal which is the conversation of the 'stringvalue' from a string to a decimal.<br></br>   CDecimal('4.0') Returns 4.0">CDecimal('stringvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a int 32 which is the conversation of the decimal 'value'.<br></br>  CDecimalToInt32(9.23) Returns 9">CDecimalToInt32('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a double which is the conversation of the 'stringvalue' from a string to a double.<br></br>   CDouble('4.0') Returns 4.0">CDouble('stringvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a int 32 which is the conversation of the float 'value'.<br></br>  CFloatToInt32(9.23) Returns 9">CFloatToInt32('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a int 32 which is the conversation of the 'stringvalue' from a string to a int.<br></br>  CInt32('4') Returns 4">CInt32('stringvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a int 64 which is the conversation of the 'stringvalue' from a string to a int.<br></br>  CInt64('9') Returns 9">CInt64('stringvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns an OptionSetValue<br></br>  COptionSetValue('9')">COptionSetValue('stringvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a string representation of any number, decimal, currency or boolean value. An optional format may also be applied. <br></br>  ToString(99) Returns '99' <br></br>  ToString(LocalDate(), 'MMM-yyyy') Returns 'DEC-2011'">ToString('valuetoconvert', 'format')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a string of XML from the Node (i.e. an XML Element)<br></br> ">CNodeToXml('node')</span></a></li>
                        </ul> 
                    </li> 
                    <li class="folder"><a class="ui-link"><span>Date</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Returns a date which is calculated by adding the number of days parameter to the given date.<br></br>  AddDays('02/23/2012', 4) Returns 02/27/2012 (US Format)">AddDays('datetime', 'numberofdays')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a date which is calculated by adding the number of hours parameter to the given date.<br></br>  AddHours('02/23/2012 00:00:00', 4) Returns 02/23/2012 04:00:00 (US Format)">AddHours('datetime', 'numberofhours')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a date which is calculated by adding the number of months parameter to the given date.<br></br>  AddMonths('04/15/2012', 3) Returns 07/15/2012 (US Format)">AddMonths('datetime', numberofmonths)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a date which is calculated by adding the number of minutes parameter to the given date.<br></br>  AddMinutes('04/15/2012', 10) Returns 04/15/2012 : 12:10:00 (US Format)">AddMinutes('datetime', 'numberofminutes')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a date which is calculated by adding the number of seconds parameter to the given date.<br></br>  AddSeconds('04/15/2012', 30) Returns 07/15/2012 : 12:00:30 (US Format)">AddSeconds('datetime', 'numberofseconds')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a date which is calculated by adding the number of years parameter to the given date.<br></br>  AddYears('08/13/2012', 2) Returns 08/13/2014 (US Format)">AddYears('datetime', 'numberofyears')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a date (UTC) given a set of inputs.   CreateDate(2008, 2, 5, 0, 0, 0, 0) Returns '2008/02/05'">CreateDate('year','month','day', 'hour','minute','second','millisecond')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Calculate the difference in time between 2 dates for a specified interval.<br></br> <br></br>Inputs: <br></br>-From Date <br></br>-To Date <br></br>-Interval ('y'- Years, 'q'- Quarters, 'm'- Months, 'pm' - Months, 'w'- Weeks, 'd'- Days, 'wd'- Weekdays, 'h'- Hours, 'mi'- Minutes, 's'- Seconds) <br></br>Example: <br></br>DateDiff('11/08/2009', '03/20/2011', 'm') Returns 16 (US Format) <br></br>DateDiff('03/03/2009', '06/01/2009', 'pm') Returns 4 as there are 4 period months (US Format)" ?="">DateDiff('fromdate', 'todate', 'interval')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Calculate the elapsed difference in time between 2 dates for a specified interval.<br></br> <br></br>Inputs: <br></br>-From Date <br></br>-To Date <br></br>-Interval ('y'- Years, 'm'- Months, 'q'- Days, 'h'- Hours, 'mi'- Minutes, 's'- Seconds) <br></br>Example: <br></br>DateDiffElapsed('11/08/2009', '03/20/2011', 'm') Returns 4 (US Format)" ?="">DateDiffElapsed('fromdate', 'todate', 'interval')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Calculate the elapsed description difference in time between 2 dates for a specified interval.<br></br> <br></br>Inputs: <br></br>-From Date <br></br>-To Date <br></br>-Interval ('y'- Years, 'm'- Months, 'd'- Days, 'h'- Hours, 'mi'- Minutes, 's'- Seconds) <br></br>Example: <br></br>DateDiffElapsedDescription('11/08/2009', '03/20/2011', 'd') Returns 1 Year 4 Months 12 Days" ?="">DateDiffDescription('fromdate', 'todate', 'interval')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the number of working days between two dates. <br></br>Uses a Monday - Friday work week by default and the records defined in the business close calendar within CRM. <br></br>   DiffWorkingDays('12/18/2012', '12/21/2012')  Returns 3">DiffWorkingDays('startdate', 'enddate')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the date only part of a datetime.   GetDateOnly('01/18/2012 16:34:54') Returns '01/18/2012' (US Format)">GetDateOnly('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the day part of a datetime.   GetDay('01/18/2012') Returns 18 (US Format)">GetDay('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the day name for the given datetime.   GetDayOfWeekName('01/01/2015') Returns Thursday ">GetDayOfWeekName('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the day number for the given datetime.   GetDayOfWeekNumber('01/01/2015') Returns 4 ">GetDayOfWeekNumber('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the number of days in the given month.<br></br>   GetDaysInMonth('01/01/2012')  Returns 31">GetDaysInMonth('datetime')</span></a></li> 
                                <li class="file"><a class="ui-link"><span title="Returns the first day of the month given a date. Optional parameter to add a number of months to input date.<br></br>   GetFirstDayOfMonth('01/01/2012', 3)  Returns 04/01/2012">GetFirstDayOfMonth('datetime', 'addmonths')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the last day of the month given a date. Optional parameter to add a number of months to input date.<br></br>   GetLastDayOfMonth('01/01/2012', 2)  Returns 03/31/2012">GetLastDayOfMonth('datetime', 'addmonths')</span></a></li>
                                 <li class="file"><a class="ui-link"><span title="Returns the first day of the week given a date. <br></br>   GetFirstDayOfWeek('09/09/2015')  Returns 06/09/2015">GetFirstDayOfWeek('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the month part of a datetime.   GetMonth('01/18/2012') Returns 1 (US Format)">GetMonth('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the next working day given a date to start from. <br></br>Uses a Monday - Friday work week by default and the records defined in the business close calendar within CRM. <br></br>   GetNextWorkingDay('12/20/2012')  Returns 12/21/2012 (US Format)">GetNextWorkingDay('startdate')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the next working time given a date to start from and a number of minutes to increment by. <br></br>Uses a Monday - Friday work week by default and the records defined in the business close calendar within CRM.<br></br>   GetNextWorkingTime('12/20/2012 16:00:00', true, '9:30', '17:00', 90)  Returns 12/21/2012 10:00:00  (US Format)">GetNextWorkingTime('startdate', 'useBusinessCalendar', 'DayStartTime', 'DayEndTime', 'NumberOfMins')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the year part of a datetime.   GetYear('01/18/2012') Returns 2012 (US Format)">GetYear('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the week number for the specified date. The week number will be as defined by the ISO 8601 standard.   GetWeek('01/18/2012') Returns 3 (US Format)">GetWeek('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the elapsed week number for the specified date. <br></br>The week number will be as defined as a simple division of 7 over the number of days since Jan 01.<br></br>   GetWeekElapsed('12/31/2012') Returns 52 (US Format)">GetWeekElapsed('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true or false if the given date is a leap year.<br></br>   IsLeapYear('01/01/2012')  Returns true">IsLeapYear('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if the passed date is a working day. <br></br>Uses a Monday - Friday work week by default and the records defined in the business close calendar within CRM. <br></br>   IsWorkingDay('06/04/2012')  Returns true">IsWorkingDay('datetocheck')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the current date for the timezone that is set for the requesting user. You can also pass in an an integer timezone parameter<br></br>   LocalDate()  Returns 06/04/2012 <br></br>   LocalDate(35)  Returns 06/04/2012 Eastern Time">LocalDate()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the current date and time for the timezone that is set for the requesting user. You can also pass in an an integer timezone parameter<br></br>   LocalDateTime() Returns 06/04/2012 21:43 <br></br>   LocalDateTime(35) Returns 06/04/2012 16:43">LocalDateTime()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the date and time given a UTC datetime for the timezone that is set for the requesting user.<br></br>   LocalTimeFromUtcTime('06/04/2012 21:43') Returns 06/04/2012 23:43">LocalTimeFromUtcTime('datetime')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the current UTC date.<br></br>   UtcDate() Returns 06/04/2012">UtcDate()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the current UTC date and time.<br></br>   UtcDateTime() Returns 06/04/2012 21:43">UtcDateTime()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the current UTC time given a date and time that is local to a specified user.<br></br>   UtcTimeFromLocalTime('06/04/2012 21:43')  Returns 06/04/2012 20:43">UtcTimeFromLocalTime('datetime')</span></a></li> 

                        </ul> 
                    </li> 
                     
                   <li class="folder"><a class="ui-link"><span>Find (Single Values)</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="">*** Single Value Functions ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the average value of the 'outputfieldname' for the records specified by the input parameters.<br></br> e.g Returns the value of the average estimatedvalue of all opportunities for a customer. FindAvg('opportunity', 'customerid', [account.accountid], 'estimatedvalue', '0', false)">FindAvg('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the number of records specified by the input parameters. <br></br> e.g Returns the count of all opportunities for a customer. FindCount('opportunity', 'customerid', [account.accountid], 'estimatedvalue', '0', false)">FindCount('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Finds a comma seperated list of values on an entity based on 1 input field.  <br></br>Note that the recordcount parameter is optional (default is 50).  <br></br>  Find a list of account names that have an address1_city value of seattle. <br></br>FindListValues('account', 'address1_city', 'seattle', 'name') Returns 'Bungie, Expedia, Microsoft'  <br></br>  Find a list of account names with no filters applied. <br></br>FindListValues('account', '*', '*', 'name') Returns 'Abbott, Acer, Apple'">FindListValues('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'recordcount')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the maximum value of the 'outputfieldname' for the records specified by the input parameters.<br></br> e.g Returns the value of the max estimatedvalue of all opportunities for a customer. FindMax('opportunity', 'customerid', [account.accountid], 'estimatedvalue', '0', false)">FindMax('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the minimum value of the 'outputfieldname' for the records specified by the input parameters.<br></br> e.g Returns the value of the min estimatedvalue of all opportunities for a customer. FindMin('opportunity', 'customerid', [account.accountid], 'estimatedvalue', '0', false)">FindMin('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the Sum of the 'outputfieldname' for the records specified by the input parameters.<br></br> e.g Returns sum of all opportunities for a customer. FindSum('opportunity', 'customerid', [account.accountid], 'estimatedvalue', '0', false)">FindSum('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Finds a value in any property on any entity based on 1 input field. Note that the defaultvalue parameter is optional. <br></br>  Find on the account entity the description property where the name equals Microsoft. <br></br>FindValue('account', 'name', 'Microsoft', 'description', 'Not Found', false) Returns 'Microsofts Dynamics CRM Rocks.' <br></br>  You can also pass in parameters to the function <br></br>FindValue('account', 'name', [account.parentaccountname], 'description', 'Not Found') Returns 'North52 Formula Manager Rocks.' <br></br> You can search based on multiple input parameters. <br></br> FindValue('account', SetFindAnd('name', 'accountnumber'), SetFindAnd('north52', 'Acc-100452'), 'description')">FindValue('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname','defaultvalue')</span></a></li> 
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="">*** Single Value Functions (FetchXml) ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the value of the 'fieldname' for the first row in the set of records specified by the fetch-xml.<br></br> e.g Returns the estimated revenue for the supplied fetchxml. FindValueFD('OpenOpportunities', 'estimatedrevenue', '0', false)">FindValueFD('formuladetailname', 'fieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="">*** Single Value Agg. Functions (FetchXml) ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the average value of the 'fieldname' for the records specified by the fetch-xml.<br></br> e.g Returns the value of the average estimatedvalue of all opportunities for a customer. FindAvgFD('OpenOpportunities', 'estimatedrevenue', '0', false, SetParams('param1', 'param2'))">FindAvgFD('formuladetailname', 'fieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the number of records as specified by the fetch-xml. <br></br> e.g Returns the count of all opportunities. FindCountFD('OpenOpportunities', 'estimatedrevenue', '0', false, SetParams('param1', 'param2'))">FindCountFD('formuladetailname', 'fieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the maximum value of the 'fieldname' for the records specified by the fetch-xml.<br></br> e.g Returns the value of the max estimatedvalue of all opportunities for a customer. FindMaxFD('OpenOpportunities', 'estimatedrevenue', '0', false, SetParams('param1', 'param2'))">FindMaxFD('formuladetailname', 'fieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the minimum value of the 'fieldname' for the records specified by the fetch-xml.<br></br> e.g Returns the value of the min estimatedvalue of all opportunities for a customer. FindMinFD('OpenOpportunities', 'estimatedrevenue', '0', false, SetParams('param1', 'param2'))">FindMinFD('formuladetailname', 'fieldname', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the Sum of the 'fieldname' for the records specified by the fetch-xml.<br></br> e.g Returns sum of all opportunities for a customer. FindSumFD('OpenOpportunities', 'estimatedrevenue', '0', false, SetParams('param1', 'param2'))">FindSumFD('formuladetailname', 'fieldname', 'defaultvalue')</span></a></li>
                
                        </ul> 
                    </li> 

                     <li class="folder"><a class="ui-link"><span>Find (EntityCollections)</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Finds a collection of records. <br></br>  Find a list of accounts with description set to North52. <br></br>FindRecords('account', 'description', 'north52', '*', '50', true) <br></br> Note you can use the following function to bring back limited fields SetFindSelect('name', 'description')">FindRecords('entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'selectfields', 'recordcount')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Finds a collection of records as defined by the fetchxml defined within a formula detail record. <br></br>  Find a list of contacts with a parent company. <br></br>FindRecordsFD('ContactsWithParents')">FindRecordsFD('formuladetail')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Finds a collection of records as defined by the raw fetchxml passed into the function.">FindRecordsFetchXml('fetchxml')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Finds a specific field value in an entity collection.">FindRecordsValue('entitycollection', 'fieldname', 'defaultvalue', 'rownumber' )</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the count of rows in the entity collection.">FindECCount('entitycollection')</span></a></li>
                        </ul> 
                    </li> 

                     <li class="folder"><a class="ui-link"><span>Fuzzy Matching</span></a> 
                        <ul> 
                               <li class="file"><a class="ui-link"><span title="Computes the Damerau Levenshtein Distance Distance between 2 string. Used for fuzzy matching. <br></br>  DamerauLevenshteinDistance('microsoft', 'microsft') Returns 1">DamerauLevenshteinDistance('inputstring1', 'inputstring2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Computes the Levenshtein Distance between 2 string. Used for fuzzy matching. <br></br>  LevenshteinDistance('microsoft', 'microsft') Returns 1">LevenshteinDistance('inputstring1', 'inputstring2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a phonetic 'sounds like' encoding of a string. This is typcial used for de-duplication purposes.<br></br>  Metaphone3('Smith')  Returns 'SM0' <br></br>  Possible to get a secondary metaphone as well which helps for non-english   Metaphone3('Smith', 'Secondary')">Metaphone3('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a percentage of how alike 2 strings are given the distance between. <br></br>  Similarity('microsoft', 'microoft', 1) Returns 0.8888889">Similarity('inputstring1', 'inputstring2', 'distance')</span></a></li>
                        </ul> 
                    </li> 

                     <li class="folder"><a class="ui-link"><span>HTML</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Generate a HTML table based on the supplied entity collection (rows of data) and CSS. </br></br> ?CreateHtmlTable(</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FindRecordsFD('RetrieveFailedSystemJobsToday'), </br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetColumnOrder('name', 'startedon', 'regardingobjectid', 'ownerid', 'statecode', 'statuscode', 'operationtype'),</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'https://north52.crm4.dynamics.com/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'north52_/css/htmltable')">CreateHTMLTable('entitycollection', 'SetColumnOrder(field1, field2)', 'baseurl', 'cssref')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generate a HTML table of the Audit Trail for a particular record.<br></br>   FindRecordsAuditHtml('account', '10124ac3-0f6f-40dd-be64-d8c0bc5dbfbd', 7)">FindRecordsAuditHtml('entityname', 'recordguid', 'lastnumberofdays')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generates a raw hyper link url as a string. <br></br> e.g  LinkRawUrl('https://north52.crm4.dynamics.com', 'account', '00124ac3-0f6f-40dd-be64-d8c0bc5dbfbd')">LinkRawUrl('baseurl', 'entityname', 'recordguid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generates a hyper link to be used in a Dialog Process. Typically used to display a link to a CRM record. <br></br>  LinkDialogUrl('https://north52.crm4.dynamics.com', 'account', '00124ac3-0f6f-40dd-be64-d8c0bc5dbfbd', 'Microsoft')  ">LinkDialogUrl('baseurl', 'entityname', 'recordguid', 'displaytext')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generates a hyper link url. Typically used in emails so receipients can click on a link.<br></br>  LinkHyperLinkUrl('https://north52.crm4.dynamics.com', 'account', '00124ac3-0f6f-40dd-be64-d8c0bc5dbfbd', 'Microsoft')">LinkHyperLinkUrl('baseurl', 'entityname', 'recordguid', 'displaytext')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Takes a field with Html within it and removes all the Html.  <br></br>   StripHtml([email.description])">StripHtml('inputstring')</span></a></li>
                       </ul> 
                    </li> 


                 <li class="folder"><a class="ui-link"><span>Localization</span></a> 
                        <ul> 
                               <li class="file"><a class="ui-link"><span title="Returns the localized string name for the attribute defined by 'entitylogicalname.attributelogicalname' based on the langauge settings for the current user. <br></br>  GetAttributeDisplayName('account.name') Returns 'Account Name'">GetAttributeDisplayName('entitylogicalname.attributelogicalname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the localized string name for the optionset defined by 'entitylogicalname.attributelogicalname' and optionsetvalue based on the langauge settings for the current user. <br></br>  GetOptionSetName('opportunity.rating', 1) Returns 'Hot'">GetOptionSetName('entitylogicalname.attributelogicalname', 'optionsetvalue')</span></a></li>
                        </ul> 
                    </li> 

                    

                      <li class="folder"><a class="ui-link"><span>Logical</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Build an if statement">if(expression, true, false)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Build an iftrue statement">iftrue(expression, true)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Used as part of an if statement to indicate 'No Operation' i.e. do nothing">'NoOp'</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true a value is found within the set of values.">in</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Determines if expressions are true or false. Returns TRUE if any expression is true. Returns FALSE if all expressions are false.">or</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a TRUE response if all values are true; returns a FALSE response if one or more values are false">and</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Calculates the sum of two values. Alternatively concat string together  'Dynamics' + 'CRM' + ' Rocks'">+</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Calculates the difference of two values">-</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Divides two values">*</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Multiplies two values">/</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a remainder after a number is divided by a specified divisor">%</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Negates what it is applied to">!</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Evaluates if two values are equivalent">=</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Evaluates if two values are not equivalent">!=</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Evaluates if a value is less than the value that follows this symbol">&lt;</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Evaluates if a value is greater than the value that follows this symbol">&gt;</span></a></li>
                          </ul> 
                     
                      </li><li class="folder"><a class="ui-link"><span>Loop</span></a> 
                        <ul> 

                                <li class="file"><a class="ui-link"><b><span title="ValidationSamples">*** DoLoop ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Build a DoLoop statement. <br></br>  DoLoop(3, </br>&nbsp;&nbsp;&nbsp;CreateRecord('account',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetAttribute('name', 'Account:' + DoLoopIndex())</br>&nbsp;&nbsp;&nbsp;)</br>)  <br></br> Creates 3 account records.   <br></br> The function DoLoopIndex() allows you to access an integer containing the current index number of the loop.<br></br>The function DoLoopTotal() allows you to access an integer containing the total number of loops.">DoLoop('iterations', 'action1', 'action2')</span></a></li>

                                <li class="file"><a class="ui-link"><span title="This function allows you to access an integer containing the current index number of the loop.">DoLoopIndex()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="This function allows you to access an integer containing the total number of loops.">DoLoopTotal()</span></a></li>

                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="ValidationSamples">*** ForEachRecord ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Iterates over a set of records and performs an action <br></br>  Delete all contacts that start with the letter A. <br></br> ForEachRecord(</br>&nbsp;&nbsp;&nbsp;FindRecordsFD('AllContactsStartingWithA' ),</br>&nbsp;&nbsp;&nbsp; DeleteRecord('contact', CurrentRecord('contactid')</br>&nbsp;&nbsp;&nbsp;)</br>)  <br></br> The function RecordIndex() allows you to access an integer containing the current index number of the loop.<br></br>The function RecordTotal() allows you to access an integer containing the total number of loops. <br></br>The function CurrentRecord() allows you to access an the entity object of the current loop. ">ForEachRecord('entitycollection', 'action1', 'action2')</span></a></li>
                    
                                <li class="file"><a class="ui-link"><span title="This function allows you to access a field within the current record loop.">CurrentRecord('fieldname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Allows you to access an integer containing the current index number of the loop.">RecordIndex()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Allows you to access an integer containing the total number of loops.">RecordTotal()</span></a></li>
                         </ul> 
                       </li> 

                       <li class="folder"><a class="ui-link"><span>Math</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Returns the absolute value of a specified number. The absolute value is the number without its postive or negative sign. <br></br>  Abs(-100) Returns 100">Abs(value)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Rounds a number up to the nearest integer. <br></br>  Ceiling(34.4) Returns 35">Ceiling('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a value for e raised to the power of a number you specified. <br></br>  Exp(2) Returns 7.38905609893065">Exp('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a number rounded down to the nearest integer. <br></br>  Floor(34.4) Returns 34">Floor('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the Greatest common divisor of two numbers. Also known as Greatest Common Factor (GCF), or Highest Common Factor (HCF). <br></br>  GCD(12,18) Returns 6">GCD('num1', 'num2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the Lowest common multiper of two numbers. <br></br>  LCM(12,18) Returns 36">LCM('num1', 'num2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the maximum of two numbers. <br></br>  MaxOf(100, 200) Returns 200">MaxOf('number1', 'number2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the minimum of two numbers. <br></br>  MinOf(100, 200) Returns 100">MinOf('number1', 'number2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a specified number raised to the specified power. <br></br>  Pow(5,3) Returns 125">Pow('value', 'power')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Rounds a value to the nearest number or specified number of digits. <br></br> Round(123.47676, 2) Returns 123.48">Round('value', 'digitprecision')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="It returns one of three values: -1, 0 or 1. It returns -1 when the numeric value is negative; it returns 0 if the numeric value is zero; and it returns 1 if the numeric value is positive. <br></br>  Sign(44)  Returns 1">Sign('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the square root of a specified number. <br></br>  Sqrt(100) Returns 10">Sqrt('value')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the integral digits of the specified Decimal; any fractional digits are discarded.  <br></br> Truncate(2.91) Returns 2">Truncate('value')</span></a></li>
                        </ul> 
                    </li> 
                   <li class="folder"><a class="ui-link"><span>Platform Operations</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Creates a M:M relationship between 2 records.">AssociateEntities('entityNameLeft', 'entityLeftGuid', 'entityNameRight', 'entityRightGuid', 'relationshipName')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes a M:M relationship between 2 records.">DisAssociateEntities('entityNameLeft', 'entityLeftGuid', 'entityNameRight', 'entityRightGuid', 'relationshipName')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Executes a workflow. <br></br>  ExecuteWorkflow('Onboard Prospect', 30dd379c-ee2f-11db-8314-0800200c9a55)">ExecuteWorkflow('workflowname', 'recordid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Executes a Action. <br></br>  ExecuteAction('new_approve',</br>&nbsp;&nbsp;&nbsp; 'opportunity',</br>&nbsp;&nbsp;&nbsp; [opportunity.opportunityid],</br>&nbsp;&nbsp;&nbsp; SetAttributeActionLookup('emailto', 'EntityReference', 'systemuser','77dd379c-ee2f-11db-8314-0800200c9a55'),</br>&nbsp;&nbsp;&nbsp; SetAttributeAction('creditlimit', 'Money', '1000')</br>) ">ExecuteAction('actionname', 'entitylogicalname', 'recordid', 'param1', 'param2', 'param3')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generate Invoice From Opportunity.<br>Returns the Guid of the Invoice</br>">GenerateInvoiceFromOpportunity('opportunityid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generate Quote From Opportunity. <br>Returns the Guid of the Quote</br>">GenerateQuoteFromOpportunity('opportunityid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Generate SalesOrder From Opportunity. <br>Returns the Guid of the SalesOrder</br>">GenerateSalesOrderFromOpportunity('opportunityid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Get the action output parameter from an executed action. ">GetActionOutputParameter('executeaction', 'outputparametername', 'defaultname')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the guid of the related entity in a N:N relationship.">GetAssociationRelatedEntityReferenceId()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the name of the N:N relationship.">GetAssociationRelationshipName()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Starts the schedule for the specified name.">StartSchedule('schedulename')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Stops the schedule for the specified name.">StopSchedule('schedulename')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Shares a record with a user. <br></br> e.g. Shows how to share all privileges of a contact record with a system user except for the delete privilege <br></br>RecordShare('contact', '873489c-992f-22db-8454-0800255c9a55????'?, 'systemuser', '899989c-992f-22db-8454-0800255c9a55????'?, true, true, false, true, true, true, true)">RecordShare('entitynameofrecordtoshare', 'guidofrecordtoshare','systemuser\team', 'guidofsystemuser\team','readaccess', 'writeaccess','deleteaccess, 'assignaccess','shareaccess', 'appendaccess','appendtoaccess')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Un-shares a record with a user. <br></br> RecordUnShare('contact', '873489c-992f-22db-8454-0800255c9a55????'?, 'systemuser', '899989c-992f-22db-8454-0800255c9a55????'?)">RecordUnShare('entitynameofrecordtounshare', 'guidofrecordtounshare',  'systemuser\team', 'guidofsystemuser\team')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all shares with a record. <br></br> RecordUnShareAll('contact', '873489c-992f-22db-8454-0800255c9a55????')">RecordUnShareAll('entitynameofrecordtounshare', 'guidofrecordtounshare')</span></a></li>
                        </ul> 
                     </li> 
                     <li class="folder"><a class="ui-link"><span>Record Control</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Creates a record within the system. <br></br> You enter the name of the entity and values for all the properties you want to set. <br></br><br></br> The function will return the guid of the created record.<br></br> <br></br> CreateRecord('contact',</br> SetAttribute('firstname', 'Bill'),</br> SetAttribute('lastname', 'gates'),</br> SetAttribute('creditlimit', '5000'),</br> SetAttribute('description', '?'),</br> SetAttributeCustomer('parentcustomerid', 'account', '450dd379c-ee2f-11db-8314-0800200c777', 'Microsoft'),</br> SetAttributeLookup('perferredsystemuserid', 'systemuser', '670dd379c-ee2f-11db-8314-0800200c888')) <br></br>Note 1: Fields of type lookup  need SetAttributeLookup('fieldname', 'entityname', 'recordguid') <br></br>Note 2: Fields of type Customer need SetAttributeCustomer('fieldname', 'entityname', 'recordguid' , 'recordname') <br></br>Note 3: Fields of type PartyList need SetAttributePartyList('fieldname', 'entityname', 'partyguid' , 'partyguid')">CreateRecord('entityname', SetAttribute('attributename', 'attributevalue' ))</span></a></li>
                                <li class="file"><a class="ui-link"><span title="If the supplied record guid exists then the system will update the record else it will create it. <br></br> You enter the name of the entity and then the record guid that you want to update. If a Create occurs the guid of the new record is returned otherwise if an update occurs a NoOp returns.  <br></br> <br></br> UpdateCreateRecord('contact',</br> [account.primaryaccountid],</br> SetAttribute('firstname', 'Bill'),</br> SetAttribute('lastname', 'gates'),</br> SetAttribute('creditlimit', '5000'),</br> SetAttribute('description', '?'),</br> SetAttribute('parentcustomerid', 'account.450dd379c-ee2f-11db-8314-0800200c777.Microsoft'),</br> SetAttributeLookup('perferredsystemuserid', 'systemuser', '670dd379c-ee2f-11db-8314-0800200c888')) <br></br>Note 1: Fields of type lookup  need SetAttributeLookup('fieldname', 'entityname.recordguid') <br></br>Note 2: Fields of type Customer need SetAttributeCustomer('fieldname', 'entityname', 'recordguid' , 'recordname') <br></br>Note 3: Fields of type PartyList need SetAttributePartyList('fieldname', 'entityname', 'partyguid' , 'partyguid')">UpdateCreateRecord('entityname', 'primarykeyid', SetAttribute('attributename', 'attributevalue' ))</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Creates a note within the system. <br></br>   CreateNote('MyTitle', 'account', [account.accountid], 'This is a note...')  Returns 'NoOp' if successful">CreateNote('title', 'regardingentityname', 'regardingentityid', 'note')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Creates a note within the system if the supplied record guid exists. <br></br>   CreateNoteIfExists('MyTitle', 'account', [account.accountid], 'This is a note..')  Returns 'NoOp' if successful">CreateNoteIfExists('title', 'regardingentityname', 'regardingentityid', 'note')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Deletes a record. <br></br> Delete the account record with the guid '30dd379c-ee2f-11db-8314-0800200c9a55' <br></br>DeleteRecord('account', '30dd379c-ee2f-11db-8314-0800200c9a55')">DeleteRecord('entityname', 'guid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Deletes a record if the supplied guid exists otherwise it does nothing so returns a NoOp. <br></br> Delete the account record with the guid '30dd379c-ee2f-11db-8314-0800200c9a55' <br></br>DeleteRecordIfExists('account', '30dd379c-ee2f-11db-8314-0800200c9a55')">DeleteRecordIfExists('entityname', 'guid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Updates a record within the system.<br></br> You enter the name of the entity and then the record guid that you want to update. And after this a list of all the attributes you want to set. <br></br> <br></br> UpdateRecord('contact',</br> [account.primaryaccountid],</br> SetAttribute('firstname', 'Bill'),</br> SetAttribute('lastname', 'gates'),</br> SetAttribute('creditlimit', '5000'),</br> SetAttribute('description', '?'),</br> SetAttribute('parentcustomerid', 'account', '450dd379c-ee2f-11db-8314-0800200c777','Microsoft'),</br> SetAttributeLookup('perferredsystemuserid', 'systemuser', '670dd379c-ee2f-11db-8314-0800200c888')) <br></br>Note 1: Fields of type lookup  need SetAttributeLookup('fieldname', 'entityname', 'recordguid') <br></br>Note 2: Fields of type Customer need SetAttributeCustomer('fieldname', 'entityname', 'recordguid' , 'recordname') <br></br>Note 3: Fields of type PartyList need SetAttributePartyList('fieldname', 'entityname', 'partyguid' , 'partyguid')">UpdateRecord('entityname', 'primarykeyid', SetAttribute('attributename', 'attributevalue' ))</span></a></li>                
                                <li class="file"><a class="ui-link"><span title="Updates a record within the system if the record exists. <br></br> You enter the name of the entity and then the record guid that you want to update. If the record guid is null or empty nothing will happen (i.e. NoOp returned) . And after this a list of all the attributes you want to set. <br></br> <br></br> UpdateRecordIfExists('contact',</br> [account.primaryaccountid],</br> SetAttribute('firstname', 'Bill'),</br> SetAttribute('lastname', 'gates'),</br> SetAttribute('creditlimit', '5000'),</br> SetAttribute('description', '?'),</br> SetAttributeCustomer('parentcustomerid', 'account', '450dd379c-ee2f-11db-8314-0800200c777', 'Microsoft'),</br> SetAttributeLookup('perferredsystemuserid', 'systemuser', '670dd379c-ee2f-11db-8314-0800200c888')) <br></br>Note 1: Fields of type lookup  need SetAttributeLookup('fieldname', 'entityname', 'recordguid') <br></br>Note 2: Fields of type Customer need SetAttributeCustomer('fieldname', 'entityname', 'recordguid' , 'recordname') <br></br>Note 3: Fields of type PartyList need SetAttributePartyList('fieldname', 'entityname', 'partyguid' , 'partyguid')">UpdateRecordIfExists('entityname', 'primarykeyid', SetAttribute('attributename', 'attributevalue' ))</span></a></li>                
                                <li class="file"><a class="ui-link"><span title="Bulk updates all activity parties in a collection.<br></br>Typically used on activities such as Appointment to bulk update all required attendees.<br></br>UpdateActivityPartyBulk([appointment.requiredattendees], 'account.contact', 'lastusedincampaign.'+[appointment.modifiedon])<br></br>Note an empty string can be passed on the second parameter to indicate all activity party types ">UpdateActivityPartyBulk('ActivityPartyCollection', 'activitypartytype', SetAttribute('attributename', 'attributevalue'))</span></a></li>
                       </ul> 
                    </li> 
                      <li class="folder"><a class="ui-link"><span>Regex</span></a> 
                        <ul> 
                            <li class="file"><a class="ui-link"><span title="Searches the specified 'string' for the first occurrence of the regular expression specified in the 'regex' parameter.   RegexMatch('^abc', «abcdefg») Returns abc">RegexMatch('string', «regex»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if the defined 'regex' pattern has a match within the specified 'string' else false.   RegexIsMatch('abcdefg', «^abc»)   Returns True">RegexIsMatch('string', «regex»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a string which is the 'string' but replaces all regex matches of 'regextofind' with 'regextoreplace'.   RegexReplace('0123456789', «(\d{3})(\d{3})(\d{4})», «($1) $2-$3»)  Returns (012) 345 6789">RegexReplace('string', «regextofind», «regextoreplace»)</span></a></li>

                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="ExtractSamples">*** Extract Samples ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Extract the first 3 digits from a string">RegexMatch('abc1234def', «\d\d\d»)</span></a></li>

                                <li class="file"><a class="ui-link"><span title="CleanSamples">*** Cleaning Samples ***</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all digits from a string">RegexReplace('stringinput', «\d», '')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all characters from a string to only leave digits">RegexReplace('stringinput', «\D», '')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes duplicate white space (tabs, newlines, spaces, etc,) from a string">RegexReplace('stringinput', «\s+», ' ')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all non-ascii characters from a string">RegexReplace('stringinput', «[^\u0000-\u007F]», '')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all non-ascii characters and ascii control characters from a string">RegexReplace('stringinput', «[^\u0020-\u007F]», '')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes everthing except alpahnumeric ascii characters from a string">RegexReplace('stringinput', «[^A-Za-z0-9]», '')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all non-alphanumeric charcters except @, - (a dash), . (a period)">RegexReplace('stringinput', «[^\w\.@-]», '')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Formats a US telephone number">RegexReplace('US telephone number', «(\d{3})(\d{3})(\d{4})», «($1) $2-$3»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Formats a US telephone number with extensions">RegexReplace('US telephone number', «^\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d)\D*(\d{2,})$», «+1 ($1$2$3) $4$5$6-$7$8$9$10 Ext $11»)</span></a></li>

                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="ValidationSamples">*** Validation Samples ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates an email address">RegexIsMatch('Email address', «^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates an Uri">RegexIsMatch('Uri', «(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates any whole or decimal number">RegexIsMatch('Any whole or decimal number', «^([0-9]*|\d*\.\d{1}?\d*)$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates US Currency">RegexIsMatch('US Currency', «^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates one numeric digit">RegexIsMatch('One numeric digit', «^\d$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates a percentage to 2 decimal places">RegexIsMatch('A percentage to 2 decimal places ', «^( 100(?:\.0{1,2})? | 0*?\.\d{1,2} | \d{1,2}(?:\.\d{1,2})? )% $»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates a password must be at least 8 characters, no more than 15 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit">RegexIsMatch('A password must be at least 8 characters, no more than 15 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit', «^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,15}$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates a UK vehicle registration">RegexIsMatch('A UK vehicle registration', «^([A-Z]{3}\s?(\d{3}|\d{2}|d{1})\s?[A-Z])|([A-Z]\s?(\d{3}|\d{2}|\d{1})\s?[A-Z]{3})|(([A-HK-PRSVWY][A-HJ-PR-Y])\s?([0][2-9]|[1-9][0-9])\s?[A-HJ-PR-Z]{3})$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates alpha numberic values">RegexIsMatch('Alpha numberic values', «^[a-zA-Z0-9]+$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates a UK National Insurance Number">RegexIsMatch('A UK National Insurance Number', «^[A-CEGHJ-PR-TW-Z]{1}[A-CEGHJ-NPR-TW-Z]{1}[0-9]{6}[A-DFM]{0,1}$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates credit card numbers">RegexIsMatch('Credit card numbers', «^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates US telephone numbers">RegexIsMatch('US telephone numbers', «^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates US Zip Codes">RegexIsMatch('US Zip Codes', «(^(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?$)»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates German Post Codes">RegexIsMatch('German Post Codes', «\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates UK Post Codes">RegexIsMatch('UK Post Codes', «^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates UK Telephone Number">RegexIsMatch('UK Telephone Number', «(\s*\(?0\d{4}\)?(\s*|-)\d{3}(\s*|-)\d{3}\s*)|(\s*\(?0\d{3}\)?(\s*|-)\d{3}(\s*|-)\d{4}\s*)|(\s*(7|8)(\d{7}|\d{3}(\-|\s{1})\d{4})\s*)»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates US Telephone Number">RegexIsMatch('US Telephone Number', «^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates date of birth (MM/DD/YYYY)">RegexIsMatch('Date of birth (MM/DD/YYYY)', «^((0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2})*$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates for digits only">RegexIsMatch('Digits only', «^[0-9]*$»)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Validates US social security numbers">RegexIsMatch('US social security number', «/^([0-9]{3}[-]*[0-9]{2}[-]*[0-9]{4})*$/»)</span></a></li>
                        </ul> 
                    </li> 
                         <li class="folder"><a class="ui-link"><span>Native Fields</span></a> 
                        <ul> 
                             <li class="file"><a class="ui-link"><span title="Gets a party record id from a partylist. <br></br> GetPartyListItemId([phone.from], 0) Returns '30dd379c-ee2f-11db-8314-0800200c9a55'">GetPartyListItemId('partylist', 'index')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Gets a party record type from a partylist. <br></br> GetPartyListItemType([phone.from], 0) Returns 'contact'">GetPartyListItemType('partylist', 'index')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Gets a party record name from a partylist. <br></br> GetPartyListItemName([phone.from], 0) Returns 'John Grace'">GetPartyListItemName('partylist', 'index')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Gets the count of the the number of parties in a party list. <br></br> GetPartyListCount([phone.from]) Returns 3">GetPartyListCount('partylist')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the target property of a formula when it is of type customer. <br></br>  SetCustomerLookup('account', '630dd379c-ee2f-11db-8314-0800200c9a5', 'Microsoft')">SetCustomerLookup('entityname', 'guid', 'Primary Field Text')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the target property of a formula when it is of type lookup. <br></br> Set a lookup with just the guid when the target property datatype is a lookup and not a Regarding field.  <br></br>  SetLookup('630dd379c-ee2f-11db-8314-0800200c9a5')">SetLookup('guid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the owner field of a record to a team represented by the guid.">SetOwnerTeam('guid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the owner field of a record to a user represented by the guid.">SetOwnerUser('guid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets values for a field of type Party List. <br></br>  Sets the party list field to 2 accounts as defined by the 2 account guids. <br></br> SetPartyList('account','630dd379c-ee2f-11db-8314-0800200c9a5', '895dd379c-ee2f-11db-8314-0800200c6t6')">SetPartyList('entityname','guidentity','guidentity')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Combines multiple SetPartList to a single combined list. Used when you need to mix the underlying entity types. <br></br>   SetPartyListCombined(SetPartyList('account','630dd379c-ee2f-11db-8314-0800200c9a5', '895dd379c-ee2f-11db-8314-0800200c6t6'),SetPartyList('contact','450dd379c-ee2f-11db-8314-0800200c777'))">SetPartyListCombined(SetPartyList('entityname','guidentity','guidentity'), SetPartyList('entityname','guidentity','guidentity'))</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the target property of a formula when it is of type lookup but is a regarding field. <br></br>  SetRegardingLookup('account', '630dd379c-ee2f-11db-8314-0800200c9a5', 'Microsoft')">SetRegardingLookup('entityname', 'guid', 'Primary Field Text')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the state and status of a record within Dynamics CRM.">SetState(state,status)</span></a></li>
                        </ul> 
                    </li> 
                         <li class="folder"><a class="ui-link"><span>String</span></a> 
                        <ul> 
                             <li class="file"><a class="ui-link"><span title="Returns a Base64 encoding of a string.">Base64Encode('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a Base64 decoding of a string.">Base64Decode('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Capitalize the first letter in a string. <br></br>   Capitalize('microsoft') Returns 'Microsoft'">Capitalize('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if the 'stringtofind' is found in the 'string' parameter.  <br></br>   Contains('Formula Manager','Man') Returns True">Contains('inputstring', 'stringtofind')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a compressed string.">Compress('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the number of characters that make up a string.  <br></br>   CountCharacters('Formula')  Returns 7">CountCharacters('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a decompressed string.">Decompress('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if one string ends with another.  <br></br>   EndsWith('microsoft', 'oft') Returns 'True'">EndsWith('inputstring', 'endstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a Guid.  <br></br>   GenerateGuid() Returns '630dd379c-ee2f-11db-8314-0800200c9a5'">GenerateGuid()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a parameter from a URL.  <br></br>   GetParamFromUrl('http://crm/main.aspx?etc=1&amp;id=630dd379c-ee2f-11db-8314-0800200c9a5&amp;pagetype=entityrecord', 'id') Returns '630dd379c-ee2f-11db-8314-0800200c9a5'">GetParamFromUrl('url', 'parameter')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the position in 'string' where the first instance on 'stringtofind' was located starting at a position of 'startindex' in the 'string paremeter.  <br></br>   IndexOf('Formula Manager', 'Man', 0) Returns 9">IndexOf('inputstring', 'stringtofind', 'startindex')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Inserts one string into another at a position.  <br></br>   Insert('The cat',4 'black ' ) Returns 'The black cat'">Insert('inputstring', position, 'insertstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the left number of characters in a string.  <br></br>   Left('microsoft', 5) Returns 'Micro'">Left('inputstring', 'numberofcharacters')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Converts all string elements to lower case.  <br></br>   Lower('Formula')  Returns formula">Lower('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a MD5 hash of a string.">MD5('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Puts a number of string characters to the left of an input string based on overall length.  <br></br>   PadLeft('1', 4, '0') Returns '0001'">PadLeft('inputstring', totalLength, 'charToPad')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Puts a number of string characters to the right of an input string based on overall length.  <br></br>   PadRight('1', 4, '0') Returns '1000'">PadRight('inputstring', totalLength, 'charToPad')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Replaces one string with another one given an input string  <br></br>   Replace('Formula Manager Rocks', 'Rocks', 'is great') Returns 'Formula Manager is great'">Replace('inputstring', 'stringtofind', 'stringtoreplace')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes a number of characters from a string at a starting position.  <br></br>   Remove('microsoft',4,2) Returns 'microft'">Remove('inputstring', 'startpostion', 'numberofcharacterstoremove')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the right number of characters in a string.  <br></br>   Right('microsoft', 4) Returns 'soft'">Right('inputstring', numberofcharacters)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Reverse the contents of a string.  <br></br>   Reverse('Formula')  Returns alumroF">Reverse('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a SHA1 hash of a string.">SHA1('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a substring from a string between a start and end position.  <br></br>   Slice('microsoft', 2, 4) Returns 'cr'">Slice('inputstring', 'start', 'end')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a substring based on a split character and index.  <br></br>   Split('microsoft.north52.ibm', '.', 1) Returns 'north52'">Split('inputstring', 'chartosplit', 'index')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if one string starts with another.  <br></br>   StartsWith('microsoft', 'mic') Returns 'True'">StartsWith('inputstring', 'startstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Takes a string and inserts the values with the params when it run.  <br></br>   StringFormat('Formula {0} Manager', 'Rocks') Returns 'Formula Rocks Manager'">StringFormat('inputstring', 'param[0]','param[1]','param[n]')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns part of the input string based on a start position and length.  <br></br>   Substring('Formula Manager', 8, 7) Returns 'Manager'">Substring('inputstring', startposition, length)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Converts all string elements to upper case.  <br></br>   Upper('Formula')  Returns FORMULA">Upper('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a string representation of any number, decimal, currency or boolean value. An optional format may also be applied. <br></br>  ToString(99) Returns '99' <br></br>  ToString(LocalDate(), 'MMM-yyyy') Returns 'DEC-2011'">ToString('valuetoconvert', 'format')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Converts the first character of a word to uppercase and the rest to lower case.  <br></br>   ToTitleCase('the quick brown fox') Returns 'The Quick Brown Fox'">ToTitleCase('inputstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes all occurrences of a set of specified characters from the beginning and end of the string.  <br></br>   Trim(' Microsoft Rocks _', ' ', _) Returns 'Microsoft Rocks'">Trim('inputstring', 'param[0]','param[1]','param[n]')</span></a></li>                        </ul> 
                    </li> 
                        <li class="folder"><a class="ui-link"><span>System</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><span title="Returns a value which has been incremented by a defined formula.  'Acc-' + PadLeft(ToString(AutoNumber([account.accountnumber]+1)), 8, '0') Returns 'Acc-00001001'" ?="">AutoNumber('autonumberstring')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if a test value lies between 2 other values. <br></br>Between(50, 25, 100) Return true">Between('testvalue', 'minvalue', 'maxvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Sets the target property of a formula to a null value.">Clear()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Clones a record. <br></br>  Shows how to clone the current account entity along with all its related 1:M contacts and opportunities <br></br>  Clone('account',[account.accountid], 'contact_customer_accounts', 'opportunity_customer_accounts', false) <br></br>  Clone just the account itself. <br></br> Clone('account',[account.accountid])">Clone('entityname', 'guidofentity', 'relationshipname', 'enableprefix')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if 'fieldtocheck' contains data.   ContainsData([account.description])  Returns True">ContainsData('fieldtocheck')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if 'fieldtocheck' does not contain data.   DoesNotContainData([account.description])  Returns False">DoesNotContainData('fieldtocheck')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="A DecisionTable allows you to execute multiple steps driven from a spreadsheet.">DecisionTable('step1', 'step2', 'step3')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns true if a user has a certain privilege.<br></br> DoesUserHavePrivilege(WhoAmI(), 'prvCreateaccount') returns true ">DoesUserHavePrivilege('userid', 'privilegename')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a comma seperated list of a users roles. <br></br>  GetUserRoles(WhoAmI())<br></br> Returns System Administrator, Customer Service Representative">GetUserRoles('userid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a comma seperated list of a users teams. <br></br>  GetUserTeams(WhoAmI())<br></br> Returns Sales Team, CSR Team">GetUserTeams('userid')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Gets an in memory variable.">GetVar('myvar')</span></a></li> 
                                <li class="file"><a class="ui-link"><span title="Returns true if the user is in the list of security roles otherwise false. <br></br>  IsUserInSecurityRoles(WhoAmI(), 'System Administrator', 'Salesperson')<br></br> Returns true" ?="">IsUserInSecurityRoles('userid', 'securityrole1', 'securityrole2')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Find the max of two values. <br></br>  MaxOf(10,100) Returns 100">MaxOf(value1, value2)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Find the min of two values. <br></br>  MinOf(10,100) Returns 10">MinOf(value1, value2)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a random integer between the supplied min and max values. <br></br>  Random(0,100) Returns 25">Random(minvalue, maxvalue)</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Removes the attribute specified in the target property from the current operation.">RemoveAttribute()</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the prior value of a field. <br></br> Allows for comparsion of previous values such as only execute a validation rule if a picklists prior value was 'Pending' and it is now going to 'Closed' <br></br>  PriorValue('[account.description]')">PriorValue('fieldreference')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Send an email.">SendEmail('emailguid')</span></a></li> 
                                <li class="file"><a class="ui-link"><span title="Sets an in memory variable.">SetVar('myvar')</span></a></li> 
                                <li class="file"><a class="ui-link"><span title="Sets the currency symbol on a money\decimal field. Primary used to apply a custom currency symbol when using a calculated field.  <br></br>   SetCurrencySymbol(Sum('HotOpps.estimatedvalue'), '$') Returns $ 121,387">SetCurrencySymbol('Value', 'CurrencySymbol')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="A SmartFlow allows you to execute multiple steps.">SmartFlow('step1', 'step2', 'step3')</span></a></li> 
                                <li class="file"><a class="ui-link"><span title="Shows the user an error message.">ThrowError('message')</span></a></li> 
                                <li class="file"><a class="ui-link"><span title="Returns a GUID represeting the current user.   WhoAmI() Returns 30dd379c-ee2f-11db-8314-0800200c9a55">WhoAmI()</span></a></li> 
                        </ul> 
                    </li> 
                        <li class="folder"><a class="ui-link"><span>WebFusion</span></a> 
                           <ul>

                            <li class="folder"><a class="ui-link"><span>Azure Services</span></a> 
                                <ul> 
                                    <li class="file"><a class="ui-link"><span title="Coming soon...">Coming soon...</span></a></li>
                                </ul> 
                            </li> 

                              <li class="folder"><a class="ui-link"><span>Process - JSON</span></a> 
                                <ul> 
                                    <li class="file"><a class="ui-link"><span title="Creates a JSON Array.">CreateJArray(CreateJObject(), CreateJObject())</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Creates a JSON Array which will be populated with JObjects from FindRecords().">CreateJArrayChildren('entitycollection', CreateJObject())</span></a></li> 
                                    <li class="file"><a class="ui-link"><span title="Creates a JSON Object.">CreateJObject(CreateJProperty(), CreateJProperty())</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Creates a JSON Property.">CreateJProperty('fieldname', 'fieldvalue')</span></a></li> 
                                    <li class="file"><a class="ui-link"><span title="Used in-conjunction with the CreateJArrayChildren() function to build the data.">FindJArrayItem('fieldname', 'defaultvalue')</span></a></li> 
                                    <li class="file"><a class="ui-link"><span title="Gets a value from a JSON document.">GetVarJsonValue('selecttoken')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Get an EntityCollection from a JSON document.">GetVarJsonEC('selecttoken')</span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="JSON Samples">*** JSON Samples ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="JSONSamples">*** Basic JSON creation ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474668-n52-bpa-functions-json'>Review Online Sample</a>">CreateJObject(
                   CreateJProperty('AccountName', [account.name]),  
                   CreateJProperty('AccountNumber', [account.accountnumber]), ? 
                   CreateJProperty('Address_Line1', [account.address1_line1]),  
                   CreateJProperty('Address_Line2', [account.address1_line2]), ?  
                   CreateJProperty('Address_Line3', [account.address1_line3]), ?  
                   CreateJProperty('Address_City', [account.address1_city]),  
                   CreateJProperty('Address_Zip', [account.address1_postalcode]),  
                   CreateJProperty('Address_State', [account.address1_stateorprovince]),  
                   CreateJProperty('Address_Country', [account.address1_country])  
             )</span></a></li> 
             <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="JSONSamples">*** Shows how to add defaults on fields and sub-objects ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474668-n52-bpa-functions-json'>Review Online Sample</a>">CreateJObject(
                   CreateJProperty('AccountName', [account.name], ''),
                   CreateJProperty('AccountNumber', [account.accountnumber], ''), ? 
                   CreateJProperty('Address_Line1', [account.address1_line1], ''),
                   CreateJProperty('Address_Line2', [account.address1_line2], ''),
                   CreateJProperty('Address_Line3', [account.address1_line3], ''),
                   CreateJProperty('Address_City', [account.address1_city], ''),
                   CreateJProperty('Address_Zip', [account.address1_postalcode], ''),  
                   CreateJProperty('Address_State', [account.address1_stateorprovince], ''),  
                   CreateJProperty('Address_Country', [account.address1_country], ''),
                   CreateJProperty('MarketingData',
                            CreateJObject(
                                      CreateJProperty('DoNotBulkMail', [account.donotbulkemail]),
                                      CreateJProperty('DoNotBulkPostalMail', [account.donotbulkpostalmail]),
                                      CreateJProperty('DoNotEmail', [account.donotemail]),
                                      CreateJProperty('DoNotFax', [account.donotfax]), 
                                      CreateJProperty('DoNotPostalMail', [account.donotpostalmail]),
                                      CreateJProperty('DoNotPhone', [account.donotphone])
                                      ) 
                              )

                     ) ?  
             </span></a></li> 
              <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="JSONSamples">*** Shows how to add child nodes ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474668-n52-bpa-functions-json'>Review Online Sample</a>">CreateJObject(
                   CreateJProperty('AccountName', [account.name], ''),
                   CreateJProperty('AccountNumber', [account.accountnumber], ''), ? 
                   CreateJProperty('Address_Line1', [account.address1_line1], ''),
                   CreateJProperty('Address_Line2', [account.address1_line2], ''),
                   CreateJProperty('Address_Line3', [account.address1_line3], ''),
                   CreateJProperty('Address_City', [account.address1_city], ''),
                   CreateJProperty('Address_Zip', [account.address1_postalcode], ''),  
                   CreateJProperty('Address_State', [account.address1_stateorprovince], ''),  
                   CreateJProperty('Address_Country', [account.address1_country], ''),
                   CreateJProperty('MarketingData',
                            CreateJObject(
                                      CreateJProperty('DoNotBulkMail', [account.donotbulkemail]),
                                      CreateJProperty('DoNotBulkPostalMail', [account.donotbulkpostalmail]),
                                      CreateJProperty('DoNotEmail', [account.donotemail]),
                                      CreateJProperty('DoNotFax', [account.donotfax]), 
                                      CreateJProperty('DoNotPostalMail', [account.donotpostalmail]),
                                      CreateJProperty('DoNotPhone', [account.donotphone])
                                      ) 
                              ),
                CreateJProperty('Contacts', 
                            CreateJArrayChildren(
                                     FindRecords('contact', 'parentcustomerid', [account.accountid], '*' ),
                                     CreateJObject(
                                                   CreateJProperty('Fullname', FindJArrayItem('fullname')),
                                                   CreateJProperty('Jobtitle', FindJArrayItem('jobtitle')), 
                                                   CreateJProperty('Email', FindJArrayItem('emailaddress1')),
                                                   CreateJProperty('BusinessPhone', FindJArrayItem('telephone1'))
                                                             ) 
                                                           )
                                         ) 
                     ) </span></a></li> 

                                </ul> 
                            </li> 

                             <li class="folder"><a class="ui-link"><span>Process - XML</span></a> 
                        <ul> 
                            <li class="file"><a class="ui-link"><span title="Creates an XML Attribute">CreateXmlAttribute('attributename', 'attributevalue')</span></a></li> 
                            <li class="file"><a class="ui-link"><span title="Creates a set of child XML Elements">CreateXmlChildren('collectionname', 'collectionitemname', 'entitycollection', 'xmlelement', 'xmlelement')</span></a></li> 
                            <li class="file"><a class="ui-link"><span title="Creates an XML Declaration">CreateXmlDeclaration('version','encoding','standalone')</span></a></li>
                            <li class="file"><a class="ui-link"><span title="Creates an XML Element">CreateXmlElement('elementname', 'elementvalue')</span></a></li> 
                            <li class="file"><a class="ui-link"><span title="Creates an XML Declaration">CreateXmlRootAttribute('name', 'value', 'name', 'value')</span></a></li>
                            <li class="file"><a class="ui-link"><span title="Creates the Xml Root Node for the document.">CreateXmlRootNode('nameofrootnode', 'xmldeclaration', 'xmlschemas\root attributes', 'xmlnodes')</span></a></li> 
                            <li class="file"><a class="ui-link"><span title="Used in conjunction with the CreateXmlChildren() function to lookup values">FindXmlItem('fieldname')</span></a></li>
                            <li class="file"><a class="ui-link"><span title="Gets a value from a XML document.">GetVarXPathValue('xpath')</span></a></li>
                            <li class="file"><a class="ui-link"><span title="Get an EntityCollection from a XML document.">GetVarXPathEC('xpath')</span></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><b><span title="XMLSamples">*** XML Samples ***</span></b></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><b><span title="XMLSamples">*** Basic XML document creation ***</span></b></a></li>
                            <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474659-n52-bpa-functions-xml'>Review Online Sample</a>">CreateXmlRootNode('Account','', '',
                   CreateXmlElement('AccountName', [account.name]),  
                   CreateXmlElement('AccountNumber', [account.accountnumber]), ? 
                   CreateXmlElement('Address_Line1', [account.address1_line1]),  
                   CreateXmlElement('Address_Line2', [account.address1_line2]), ?  
                   CreateXmlElement('Address_Line3', [account.address1_line3]), ?  
                   CreateXmlElement('Address_City', [account.address1_city]),  
                   CreateXmlElement('Address_Zip', [account.address1_postalcode]),  
                   CreateXmlElement('Address_State', [account.address1_stateorprovince]),  
                   CreateXmlElement('Address_Country', [account.address1_country]) 
             )</span></a></li> 
              <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><b><span title="XMLSamples">*** Shows how to add defaults on elements &amp; sub-elements ***</span></b></a></li>
                            <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474659-n52-bpa-functions-xml'>Review Online Sample</a>">CreateXmlRootNode('Account','','',
    CreateXmlElement('AccountName', [account.name], ''), 
    CreateXmlElement('AccountNumber', [account.accountnumber], ''), 
    CreateXmlElement('Address_Line1', [account.address1_line1], ''), 
    CreateXmlElement('Address_Line2', [account.address1_line2], ''), 
    CreateXmlElement('Address_Line3', [account.address1_line3], ''), 
    CreateXmlElement('Address_City', [account.address1_city], ''), 
    CreateXmlElement('Address_Zip', [account.address1_postalcode], ''), 
    CreateXmlElement('Address_State', [account.address1_stateorprovince], ''), 
    CreateXmlElement('Address_Country', [account.address1_country], ''),
    CreateXmlElement('MarketingData', 
              CreateXmlElement('DoNotBulkMail', [account.donotbulkemail]),
              CreateXmlElement('DoNotBulkPostalMail', [account.donotbulkpostalmail]),
              CreateXmlElement('DoNotEmail', [account.donotemail]),
             CreateXmlElement('DoNotFax', [account.donotfax]), 
              CreateXmlElement('DoNotPostalMail', [account.donotpostalmail]),
              CreateXmlElement('DoNotPhone', [account.donotphone])
             )
)</span></a></li> 
              <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><b><span title="XMLSamples">*** Shows how to add XML attributes on an element ***</span></b></a></li>
                             <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474659-n52-bpa-functions-xml'>Review Online Sample</a>">CreateXmlRootNode('Account','','',
    CreateXmlElement('AccountName', [account.name], ''), 
    CreateXmlElement('AccountNumber', [account.accountnumber], ''), 
    CreateXmlElement('Address_Line1', [account.address1_line1], ''), 
    CreateXmlElement('Address_Line2', [account.address1_line2], ''), 
    CreateXmlElement('Address_Line3', [account.address1_line3], ''), 
    CreateXmlElement('Address_City', [account.address1_city], ''), 
    CreateXmlElement('Address_Zip', [account.address1_postalcode], ''), 
    CreateXmlElement('Address_State', [account.address1_stateorprovince], ''), 
    CreateXmlElement('Address_Country', [account.address1_country], ''),
    CreateXmlElement('MarketingData', 
              CreateXmlElement('DoNotBulkMail', [account.donotbulkemail],  '', ?
                                             CreateXmlAttribute('flag1','abc'), CreateXmlAttribute('flag2','123')?),
              CreateXmlElement('DoNotBulkPostalMail', [account.donotbulkpostalmail],  '', ?
                                            CreateXmlAttribute('flag1','abc'), CreateXmlAttribute('flag2','123')?),
              CreateXmlElement('DoNotEmail', [account.donotemail],  '', 
?                                          CreateXmlAttribute('flag1','abc'), CreateXmlAttribute('flag2','123')?),
             CreateXmlElement('DoNotFax', [account.donotfax],  '', ?
                                             CreateXmlAttribute('flag1','abc'), CreateXmlAttribute('flag2','123')?), 
              CreateXmlElement('DoNotPostalMail', [account.donotpostalmail],  '', ?
                                              CreateXmlAttribute('flag1','abc'), CreateXmlAttribute('flag2','123')?),
              CreateXmlElement('DoNotPhone', [account.donotphone],  '', 
                                             ?CreateXmlAttribute('flag1','abc'), CreateXmlAttribute('flag2','123')?)
             )
)</span></a></li> 
              <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><span></span></a></li>
                            <li class="file"><a class="ui-link"><b><span title="XMLSamples">*** Shows how to add child nodes ***</span></b></a></li>
                             <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474659-n52-bpa-functions-xml'>Review Online Sample</a>">CreateXmlRootNode('Account','','',
    CreateXmlElement('AccountName', [account.name], ''), 
    CreateXmlElement('AccountNumber', [account.accountnumber], ''), 
    CreateXmlElement('Address_Line1', [account.address1_line1], ''), 
    CreateXmlElement('Address_Line2', [account.address1_line2], ''), 
    CreateXmlElement('Address_Line3', [account.address1_line3], ''), 
    CreateXmlElement('Address_City', [account.address1_city], ''), 
    CreateXmlElement('Address_Zip', [account.address1_postalcode], ''), 
    CreateXmlElement('Address_State', [account.address1_stateorprovince], ''), 
    CreateXmlElement('Address_Country', [account.address1_country], ''),
    CreateXmlElement('MarketingData', 
              CreateXmlElement('DoNotBulkMail', [account.donotbulkemail]),
              CreateXmlElement('DoNotBulkPostalMail', [account.donotbulkpostalmail]),
              CreateXmlElement('DoNotEmail', [account.donotemail]),
             CreateXmlElement('DoNotFax', [account.donotfax]), 
              CreateXmlElement('DoNotPostalMail', [account.donotpostalmail]),
              CreateXmlElement('DoNotPhone', [account.donotphone])
             ),
    CreateXmlChildren('Contacts', 
              'Contact',
              FindRecords('contact', 'parentcustomerid', [account.accountid], '*' ),
              CreateXmlElement('FullName', FindXmlItem('fullname')),
             CreateXmlElement('JobTitle', FindXmlItem('jobtitle')), 
              CreateXmlElement('Email', FindXmlItem('emailaddress1')),
              CreateXmlElement('BusinessPhone', FindXmlItem('telephone1'))
             )
)</span></a></li>  
                        </ul> 
                    </li> 

                            <li class="folder"><a class="ui-link"><span>REST Services</span></a> 
                                <ul> 
                                    <li class="file"><a class="ui-link"><span title="Allows you to call a web service that is REST based.">CallRestAPI(
                    SetRequestBaseURL('baseurl'),
                    SetRequestResource('resource'),
                    SetRequestDetails('method'),
                    SetRequestHeaders(),
                    SetRequestParams(),
                    SetRequestAuthenticationNone(),
                    SetRequestFiles(),
                    SetRequestExpected('responsestatuscode'),
                    SetRequestActionPass('action'),
                    SetRequestActionFail('action')
                   )               </span></a></li>
                                
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="Rest Functions">*** Rest Functions ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Returns a value within the Response Content (JSON) of the REST API call.?<br></br> ">GetVarJsonValue??('fieldpath')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Returns an Entity Collection within the Response Content (JSON) of the REST API call.?<br></br>">GetVarJsonEC??('fieldpath')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Returns a value within the Response Content (XML) of the REST API call.??<br></br>">GetVarXmlValue??('fieldpath')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Returns an Entity Collection within the Response Content (XML) of the REST API call.?<br></br>">GetVarXmlEC???('fieldpath')</span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="Rest Samples">*** Rest Samples ***</span></b></a></li>
                                    
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="RestSamples">*** Send a SMS message on the Twilio platform ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474772-n52-bpa-functions-rest-services'>Review Online Sample</a>">CallRestAPI(
                  SetRequestBaseURL('https://api.twilio.com/2010-04-01'),
                  SetRequestResource('/Accounts/{0}/Messages.json', 'Twilio_AccountSID'),
                  SetRequestDetails('Post'), 
                  SetRequestHeaders(),
                  SetRequestParams('From', '+441403540192', 'To', '07748344932', 'Body', 'North52 Rocks!!'),
                  SetRequestAuthenticationBasic('Twilio_AccountSID', 'Twilio_AuthToken'),
                  SetRequestFiles(),
                  SetRequestExpected('Created'),
                  SetRequestActionPass(),
                  SetRequestActionFail()
         )
                                    </span></a></li> 

                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="RestSamples">*** Send a SMS message on the Twilio platform, with an Action***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474772-n52-bpa-functions-rest-services'>Review Online Sample</a>">CallRestAPI(
                  SetRequestBaseURL('https://api.twilio.com/2010-04-01'),
                  SetRequestResource('/Accounts/{0}/Messages.json', 'Twilio_AccountSID'),
                  SetRequestDetails('Post'), 
                  SetRequestHeaders(),
                  SetRequestParams('From', '+441403540192', 'To', '07748344932', 'Body', 'North52 Rocks!!'),
                  SetRequestAuthenticationBasic('Twilio_AccountSID', 'Twilio_AuthToken'),
                  SetRequestFiles(),
                  SetRequestExpected('Created'),
                  SetRequestActionPass(CreateRecord('task', 
                                                     1,
                                                     SetAttribute('subject', 'SMS ID:' + GetVarJsonValue('sid') + ' DateCreated:' + GetVarJsonValue('date_created')
                                                   )
                                       )
                  ),
                  SetRequestActionFail()
                   
                   
         )                          </span></a></li> 
                                    
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="RestSamples">*** Retrieve all SMS messages on the Twilio platform, with an Action***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474772-n52-bpa-functions-rest-services'>Review Online Sample</a>">CallRestAPI(
                  SetRequestBaseURL('https://api.twilio.com/2010-04-01'),
                  SetRequestResource('/Accounts/{0}/Messages.json', 'Twilio_AccountSID'),
                  SetRequestDetails('Get'),                            
                  SetRequestHeaders(),
                  SetRequestParams(),
                  SetRequestAuthenticationBasic('Twilio_AccountSID', 'Twilio_AuthToken'),
                  SetRequestFiles(),
                  SetRequestExpected('OK' ),
                  SetRequestActionPass(
                                         ForEachRecord(GetVarJsonEC('messages'),
                                             CreateRecord('task',
                                                           1,
                                                           SetAttribute('subject', 'SMS ID:' +  CurrentRecord('sid') )
                                                         )
                                                      )
                                      ),
                  SetRequestActionFail()
                  
         )                          </span></a></li>

                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="RestSamples">*** Make an IDOL request to get content ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474772-n52-bpa-functions-rest-services'>Review Online Sample</a>">CallRestAPI(
                SetRequestBaseURL('https://api.idolondemand.com/'),
                SetRequestResource('1/api/sync/getcontent/v1),
                SetRequestDetails('Get'),
                SetRequestHeaders(),                            
                SetRequestParams('index_reference', 'http://en.wikipedia.org/wiki/Alan Turing', 'highlight_expression', 'Alan Turing', 'apikey', 'enter_apikey'),
                SetRequestAuthenticationNone(),
                SetRequestFiles(),
                SetRequestExpected('OK' ),
                SetRequestActionPass(
                                       UpdateRecord('account', 
                                                    [account.accountid] ,
                                                    SetAttribute('description', GetVarJsonValue('documents{0}.wikipedia_category{16}')
                                                   )
                                    ),
                  SetRequestActionFail()
         )
                                   </span></a></li>

                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="RestSamples">*** Convert some HTML to a PDF document and store as an attachment ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474772-n52-bpa-functions-rest-services'>Review Online Sample</a>">CallRestAPI(
                            SetRequestBaseURL('https://htmlpdfapi.com/api/v1'),
                            SetRequestResource('/pdf'),
                            SetRequestDetails('Post'),                            
                            SetRequestHeaders('Authentication', 'Token'),
                            SetRequestParams('html', 'enter html here'),
                            SetRequestAuthenticationNone(),
                            SetRequestFiles(),
                            SetRequestExpected('OK' ),
                            SetRequestActionPass(
                                                   CreateNote('title', 'account', [account.accountid] , 'note', 'result.pdf', 'application/pdf', GetVar('file')) 
                                                 ),
                            SetRequestActionFail()
                ) 
                           </span></a></li>
                           
                           <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><span></span></a></li>
                                    <li class="file"><a class="ui-link"><b><span title="RestSamples">*** Convert some HTML in an attachment to a PDF document and store result as a attachment ***</span></b></a></li>
                                    <li class="file"><a class="ui-link"><span title="<a target='_blank' style='color: White' href='http://support.north52.com/knowledgebase/articles/474772-n52-bpa-functions-rest-services'>Review Online Sample</a>">CallRestAPI(
                            SetRequestBaseURL('https://htmlpdfapi.com/api/v1'),
                            SetRequestResource('/pdf'),
                            SetRequestDetails('Post'),                            
                            SetRequestHeaders('Authentication', 'Token'),
                            SetRequestParams(),
                            SetRequestAuthenticationNone(),
                            SetRequestFiles(
                                              SetRequestFile('file',
                                                             Base64Decode(FindValue('annotation', 'objectid', [account.accountid],'documentbody')),
                                                            'file.html',
                                                            'plain/text')
                                                          ),
                            SetRequestExpected('OK' ),
                            SetRequestActionPass(
                                                  CreateNote('title', 'account', [account.accountid] , 'note', 'result.pdf', 'application/pdf', GetVar('file'))
                                                ),
                            SetRequestActionFail()
                           )
                           </span></a></li>

                                </ul> 
                            </li> 
                              <li class="folder"><a class="ui-link"><span>Native Services</span></a> 
                                <ul> 
                                    <li class="file"><a class="ui-link"><span title="Returns the latitude and longitude of the given address.<br></br>  GeoCodeBing('16771 NE 72nd Way', 'Redmond', 'WA', '98052', 'USA') Returns '47.66898|-122.11675' <br></br>The bing maps key need to be entered in on the North52 Configuration entity">GeoCodeBing('addressLine', 'locality', 'adminDistrict', 'postalCode', 'countryRegion')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Returns the exchange rate between 2 curriences.<br></br> The Open Exchange Rates APP ID is stored on the North52 Configurtion object.">GetExchangeRate('from', 'to')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Returns the translation of the given text. The second and third parameters are optional. <br></br>  Translate('Merci') Returns 'Thank you' (Assumes user setting is set to English) <br></br>  Translate('Dank', 'de') Returns 'Thanks' (German text to English) <br></br>The bing translator credentials need to be entered in on the North52 Configuration entity">Translate('text', 'to', 'from')</span></a></li> 
                                </ul> 
                            </li> 

                           <li class="folder"><a class="ui-link"><span>SharePoint Services</span></a> 
                                <ul> 
                                    <li class="file"><a class="ui-link"><span title="Create a SharePoint File <br></br> SharePointCreateFile('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'https://north52.sharepoint.com/CRMSite/CRMDocuments/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Test.pdf',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FindValue('annotation', 'objectid', [quote.quoteid], 'documentbody' ),</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SharePointSetItemMetaData('QuoteID', [quote.quotenumber] )<br></br> ) ">SharePointCreateFile('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'replaceexistingfile', 'documentlibrary', 'filename', 'documentdata', 'metadata')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Create a SharePoint Folder <br></br> SharePointCreateFolder('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'https://north52.sharepoint.com/CRMSite/CRMDocuments/FolderName'</br>&nbsp;&nbsp;&nbsp;&nbsp;) ">SharePointCreateFolder('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'foldertocreate')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Create a SharePoint Site <br></br> SharePointCreateSite('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'MySite',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'MySite',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MySite,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '1033',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'sts',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'false' )<br></br> ) ">SharePointCreateSite('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'siteurlname', 'sitename', 'sitedesc', 'language', 'template', 'uniquepermissions')</span></a></li>
                            
                                    <li class="file"><a class="ui-link"><span title="Delete a SharePoint File  <br></br> SharePointDeleteFile('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'https://north52.sharepoint.com/CRMSite/CRMDocuments/Test.pdf'</br>&nbsp;&nbsp;&nbsp;&nbsp;) ">SharePointDeleteFile('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'filetodelete')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Find a SharePoint document via fetchxml">SharePointFindDocumentsByFetchXml('entity','entityid','fetchxml')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="Get a SharePoint file <br></br> CreateNote('title', 'contact', [contact.contactid] , 'notetext', 'john99.txt', 'text/plain',<br></br> SharePointGetFile('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'https://north52.sharepoint.com/CRMSite/CRMDocuments/john.txt'</br>&nbsp;&nbsp;&nbsp;&nbsp; )<br></br> ) ">SharePointGetFile('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'filetoretrieve')</span></a></li>
                           
                           <li class="file"><a class="ui-link"><span title="SharePoint Get Item Metadata<br></br> SmartFlow(</br></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SharePointGetItemMetaData('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true,</br> 'Test.pdf'),</br></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetVarJsonValue('d.Title') + GetVarJsonValue('d.GUID')<br></br> ) ">SharePointGetItemMetaData('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'filename')</span></a></li>
                                    <li class="file"><a class="ui-link"><span title="SharePoint Update Item Metadata<br></br> SharePointUpdateItemMetaData('https://north52.sharepoint.com/CRMSite/',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'bill@north52.com',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'password',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true,</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true,</br> 'Test.pdf',</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SharePointSetItemMetaData('QuoteID', [quote.quotenumber] )<br></br> ) ">SharePointUpdateItemMetaData('sharepointside', 'sharepointusername', 'sharepointuserpassword', 'issharepointonline', 'filename', 'metadata')</span></a></li>
                                   
                                </ul> 
                            </li> 

                          </ul> 
                       </li> 

                  <li class="folder"><a class="ui-link"><span>xCache</span></a> 
                        <ul> 
                                <li class="file"><a class="ui-link"><b><span title="xCacheGlobal">*** xCache Global ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the xCache value for the given key for the Global xCache.<br></br>   xCacheGetGlobal('Greeting') Returns Hello">xCacheGetGlobal('key', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><span></span></a></li>
                                <li class="file"><a class="ui-link"><b><span title="xCacheLocal">*** xCache Local ***</span></b></a></li>
                                <li class="file"><a class="ui-link"><span title="Adds a calculated field to an existing local xCache collection.<br></br>   xCacheAddCalculatedFieldLocal('AllOrders', 'Total', 'Double', 'new_quantity * new_price') ">xCacheAddCalculatedFieldLocal('key', 'name', 'datatype', 'expression')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns a calculated value from  the local xCache collection based on an optional filter.<br></br>   xCacheCalculateLocal('Accounts', 'Sum(numberofemployees)', 'address1_city = &quot;London&quot; ', '0') Returns 2734"> xCacheCalculateLocal('key', 'expression', 'filter', 'defaultvalue')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Loads an xCache collection from based on an existing collection with a supplied filter.<br></br>   xCacheFilterLocal('AllAccounts', 'address1_country =  &quot;USA&quot; ', 'address1_city')">xCacheFilterLocal('key', 'filter', 'sort')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Returns the xCache value for the given key for the Local xCache.<br></br>   xCacheGetLocal('AllAccounts', 'description') Returns Hello">xCacheGetLocal('key', 'fieldname', 'defaultvalue', 'rownumber')</span></a></li>
                                <li class="file"><a class="ui-link"><span title="Loads an xCache collection from an EntityCollection.<br></br>   xCacheLoadLocal('AllAccounts', FindRecords('account', '*', '*', '*')) ">xCacheLoadLocal('key', 'entitycollection')</span></a></li>
 
                        </ul> 
                    </li> 
                  
                  </ul></div>
                </div> <!---Tab--->


                    <div id="tabs-source">
                        <div id="refreshContainer" style="padding: 12px 14px 0px;"><input id="txtFindSource"  style="border:1px solid gray; width: 90%;" type="text" placeholder="Search source..."  /> <input id="refreshSource" style="float: right;" onclick="North52.FormulaEditor.RefreshSource();" type="image" src="north52_image_refresh">  </div>
                        
                        <ul id="treesource">
                            <li class="folder">
                                <a class="ui-link"><span>Source</span></a>
                            </li>
                        </ul>
  

                        <ul id="treerelated">
                            <li class="folder">
                                <a class="ui-link"><span>Related</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">Loading...</span></a></li>
                                </ul>
                            </li>
                        </ul>

                        <ul id="treeforms">
                            <li class="folder">
                                <a class="ui-link"><span>Forms</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">Loading...</span></a></li>
                                </ul>
                            </li>
                        </ul>

                        <ul id="treedetail">
                            <li class="folder">
                                <a class="ui-link"><span>Query Details</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">Loading...</span></a></li>
                                </ul>
                            </li>
                        </ul>

                        <ul id="treexcache">
                            <li class="folder">
                                <a class="ui-link"><span>xCache</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">Loading...</span></a></li>
                                </ul>
                            </li>
                        </ul>

                        <ul id="treecalculations">
                            <li class="folder">
                                <a class="ui-link"><span>Calculations</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">No calculations found.</span></a></li>
                                </ul>
                            </li>
                        </ul>

                        <ul id="treeactions">
                            <li class="folder">
                                <a class="ui-link"><span>Actions</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">No actions found.</span></a></li>
                                </ul>
                            </li>
                        </ul>

                    </div> <!---Tab--->

                    <div id="tabs-explore">

                        <div id="explore-commands" style="padding: 12px 14px 0px;">
                            <input id="txtFindExplore" style="border:1px solid gray; width: 50%;" type="text" placeholder="Search explore..."  />&nbsp;&nbsp;
                            <select id="exploregenerator" onchange="North52.FormulaEditor.ExploreGenerator();">
                                <option value="Select Generator">Select Generator</option>
                                <option value="CreateRecord">CreateRecord</option>
                                <option value="UpdateRecord">UpdateRecord</option>
                                <option value="UpdateRecord">UpdateCreateRecord</option>
                                <option value="XML">XML</option>
                                <option value="JSON">JSON</option>
                            </select>&nbsp;&nbsp;
                            <input id="refreshExplore" type="image" src="north52_image_progress">
                        </div>

                        <br><br>

                        <ul id="treeexplore" style="margin-top: -26px;">
                            <li class="folder">
                                <a class="ui-link"><span>Entities</span></a>
                                <ul>
                                    <li class="file"><a class="ui-link"><span title="">Loading...</span></a></li>

                                </ul>
                            </li>
                        </ul>


                    </div> <!---Tab--->

                </div> <!---Tabs--->
            </div> <!---Panel1--->

            <div id="panel2alpha">

                <ul class="wijmo-wijribbon wijmo-wijribbon-simple ui-state-default ui-helper-clearfix" id="flyoutmenu" style="margin: 0px; border: 0px currentColor; width: 100%; height: 34px; position: relative; border-image: none;">
                    <li>
                        <a href="#">Operators</a>
                        <ul>
                            <li><a href="#">+</a></li>
                            <li><a href="#">-</a></li>
                            <li><a href="#">*</a></li>
                            <li><a href="#">/</a></li>
                            <li><a href="#">!</a></li>
                            <li><a href="#">=</a></li>
                            <li><a href="#">!=</a></li>
                            <li><a href="#">&lt;</a></li>
                            <li><a href="#">&gt;</a></li>
                            <li><a href="#">In</a></li>
                            <li><a href="#">Or</a></li>
                            <li><a href="#">And</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="#">Snippets</a>
                        <ul>
                            <li><a href="#">NoOp</a></li>
                            <li><a href="#">Case</a></li>
                            <li><a href="#">If</a></li>
                            <li><a href="#">IfTrue</a></li>
                            <li><a href="#">ForEachRecord</a></li>
                            <li><a href="#">DoLoop</a></li>
                            <li><a href="#">SmartFlow</a></li>
                            <li><a href="#">Comment</a></li>
                        </ul>
                    </li>

                    <li>
                        <a href="#">Commands</a>
                        <ul>
                            <li><a href="#">Toggle Editor</a></li>
                        </ul>
                        
                    </li>

                    <div id="ribbon" style="height: 26px; float: right;">
                        <button type="button" name="btnValidate" title="Performs a basic and advanced syntax check on your formula. &#10;&#10;Note 1: You must save your formula changes before the advanced syntax check will pick them up." class="wijmo-wijribbon-button-validate"></button>
                        <button type="button" name="btnClear" title="Clears the contents of the formula description " class="wijmo-wijribbon-button-clear"></button>
                        <button type="button" name="btnFunctionWizard" title="Function Wizard" class="wijmo-wijribbon-button-function" onclick="$('#dialogFunctionWizard').wijdialog('open')"></button>
                        <button type="button" name="btnRunCommand" title="Executes the formula. Only available for formulas of type Command Console" class="wijmo-wijribbon-button-command"></button>
                    </div>

                </ul>
                
               
               
                <textarea class="ui-helper-reset" id="formulabox" style="border: 1px solid gray; width: 100%; height: 21px; overflow: hidden; margin-top: 2px; margin-bottom: 2px; display: none; resize: none;" spellcheck="false" onblur="North52.FormulaEditor.SetCursorPositionFormulaBox();"></textarea>


                     
                <div id="ss" style="border: 1px solid gray; width: 99.7%; height: 87%; display: none;"> </div>
                
                <div id="formula"></div>
                        

                        <div title="Function Wizard" id="dialogFunctionWizard">
                        </div>
                        <div title="Execute Command" id="dialogExecuteCommand">
                        </div>

                        <ul id="contextMenu">

                            <li><a><span class="wijmo-wijmenu-text">Cut</span></a></li>
                            <li><a><span class="wijmo-wijmenu-text">Copy</span></a></li>
                            <li><a><span class="wijmo-wijmenu-text">Paste</span></a></li>
                            <hr>
                            <li><a><span class="wijmo-wijmenu-text">Insert Row</span></a></li>
                            <li><a><span class="wijmo-wijmenu-text">Insert Condition</span></a></li>
                            <li><a><span class="wijmo-wijmenu-text">Insert Action</span></a></li>
                            <hr>
                            <li><a><span class="wijmo-wijmenu-text">Delete Row</span></a></li>
                            <li><a><span class="wijmo-wijmenu-text">Delete Column</span></a></li>
                            <hr>
                            <li><a><span class="wijmo-wijmenu-text">Toggle Formula Box</span></a></li>
                            <li><a><span class="wijmo-wijmenu-text">Toggle Advanced Mode</span></a></li>
                            <hr>
                            <li><a><input id="cbx_exitfirstmatch" type="checkbox" checked="checked"><span class="wijmo-wijmenu-text">   Exit on First Match   </span></a></li>
                            

                        </ul>



                    </div> <!---panel2alpha--->

                </div> <!---Splitter--->

            </div><!---Container--->

</body></html>