How to use the xrm-mock.StringAttributeMock function in xrm-mock

To help you get started, we’ve selected a few xrm-mock examples, based on popular ways it is used in public projects.

github camelCaseDave / xrm-mock-generator / src / xrm-mock-generator / attribute.js View on Github external
Attribute.prototype.createString = function (name, value, label, format, maxLength, isVisible, isDisabled) {
        var attribute = createAttribute(name, value);
        var stringAttribute = new XrmMock.StringAttributeMock(attribute, format || "text", maxLength || 100);

        addAttribute(stringAttribute);

        Control.createStringControl(name, label || "", isVisible || true, isDisabled || false, attribute);

        return stringAttribute;
    };