> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MacroParameter

> MacroParameter class

MacroParameter class

## Constructors

### MacroParameter()

```crmscript theme={null}
MacroParameter
```

Initializes a new instance of the MacroParameter class.

### MacroParameter(String,String,Map,String,String,Bool)

```crmscript theme={null}
MacroParameter(String name, String type, Map controlConfig, String label, String description, Bool isOptional)
```

Initializes a new instance of the MacroParameter class.

### MacroParameter(String,String,Map,String,String,Bool,String,Bool)

```crmscript theme={null}
MacroParameter(String name, String type, Map controlConfig, String label, String description, Bool isOptional, String defaultValue, Bool defaultValueIsFixed)
```

Initializes a new instance of the MacroParameter class.

## Methods

## getControlConfig()

Gets the optional control configuration values that influence how the input control behaves.

```crmscript theme={null}
Map getControlConfig()
```

**Returns:** [CRMScript.Native.Map](CRMScript.Native.Map)

## getDescription()

Returns a longer description of the parameter.

```crmscript theme={null}
String getDescription()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)

<Note>
  Can for instance be used as help in a form.
</Note>

## getIsFixedValue()

Returns true if the value is fixed, and false if it is read from another task or the environment.

```crmscript theme={null}
Bool getIsFixedValue()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if the value is fixed; otherwise, false.

## getIsOptional()

Returns true if the value is optional, and false if it is mandatory.

```crmscript theme={null}
Bool getIsOptional()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if the value is optional; false if mandatory.

## getLabel()

Returns the label for the parameter when displayed in a form.

```crmscript theme={null}
String getLabel()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The label for the parameter when displayed in a form.

## getName()

Returns the name of the parameter.

```crmscript theme={null}
String getName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the parameter.

<Note>
  The name is used for accessing the parameter.
</Note>

## getSourcePath()

Returns the source path of the object it is called from.

```crmscript theme={null}
String getSourcePath()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The source path of the object it is called from.

## getType()

Returns the type of the parameter.

```crmscript theme={null}
String getType()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)

<Note>
  Used for displaying correct control in form. Available types:

  * AnchorLine
  * InfoFields
  * Grid
  * HR
  * BR
  * SubHeader
  * ParserCode
  * Messages
  * EjScript
  * HtmlGrid
  * Planner
  * StaticGrid
  * DrillDown
  * GenericGrid
  * InfoFields2
  * ExtraTableEntriesGrid
  * DirectedAcyclicGraph
  * EjscriptElement
  * Chart
  * WhereChart
  * ListRecipients
  * EntityCard
</Note>

## getValue()

If the parameter is a fixed value, this function will return that value.

```crmscript theme={null}
String getValue()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)

## setControlConfig(Map)

Sets the optional configuration values for the type. The configuration will influence how the input control behaves.

```crmscript theme={null}
Void setControlConfig(Map values)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## setDescription(String)

Sets a longer description of the parameter. This description can for instance be used in as help in a form.

```crmscript theme={null}
Void setDescription(String description)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## setIsFixedValue(Bool)

Sets whether or not the parameter is a fixed value.

```crmscript theme={null}
Void setIsFixedValue(Bool isFixed)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## setIsOptional(Bool)

Sets whether or not the parameter is optional.

```crmscript theme={null}
Void setIsOptional(Bool isOptional)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## setLabel(String)

Sets the label of the parameter when displayed in form.

```crmscript theme={null}
Void setLabel(String label)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## setName(String)

Sets the name of the parameter.

```crmscript theme={null}
Void setName(String name)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Parameters are accessed by their name.
</Note>

## setSourcePath(String)

Sets the parameter's source path.

```crmscript theme={null}
Void setSourcePath(String path)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## setType(String)

Sets the type of the parameter.

```crmscript theme={null}
Void setType(String type)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Available types:

  * AnchorLine
  * InfoFields
  * Grid
  * HR
  * BR
  * SubHeader
  * ParserCode
  * Messages
  * EjScript
  * HtmlGrid
  * Planner
  * StaticGrid
  * DrillDown
  * GenericGrid
  * InfoFields2
  * ExtraTableEntriesGrid
  * DirectedAcyclicGraph
  * EjscriptElement
  * Chart
  * WhereChart
  * ListRecipients
  * EntityCard
</Note>

## setValue(String)

Sets the value of the parameter, given that the parameter is a fixed value.

```crmscript theme={null}
Void setValue(String value)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)


## Related topics

- [Namespace CRMScript.Native](/en/automation/crmscript/reference/CRMScript.Native.md)
- [CRMScript Reference](/en/automation/crmscript/reference/index.md)
- [Creating a trigger :: Macro](/en/automation/trigger/create-trigger-macro.md)
- [MacroReturnValue](/en/automation/crmscript/reference/CRMScript.Native.MacroReturnValue.md)
- [Create a macro - example from SuperOffice](/en/customization/macros-and-scripts/admin/create-macro.md)
- [Triggers](/en/customization/macros-and-scripts/admin/trigger.md)
