Create Solution
Create a new Solution.
create_solution(
name: string,
applicationsToCreate?: PartialApplicationModel[],
memberId?: string,
status?: string
): Promise<SolutionsModel>
Parameter Name | Type | Description |
---|---|---|
name | string | The name for the new Solution. Must be unique in the workspace. |
applicationsToCreate | array of table objects | (optional) Array of table objects to create in the new Solution. By default a "Table 1" with standard default fields will be created. |
memberId | string | Member Id for the owner of the Solution. Defaults to the current user. |
status | string | Status of the Solution. Defaults to active which is the active state. |
PartialApplicationModel
export interface PartialApplicationModel {
id?: ID;
name: string;
structure?: AppStructureField[];
report?: PartialReport;
solution?: ID;
}
Example Script - Create Solution
<!-- create_solution(
name: string,
applicationsToCreate?: PartialApplicationModel[],
memberId?: string,
status?: string
): Promise<SolutionsModel>-->
<script>
window.SmartSuite.create_solution('my new solution name').then((res) => {
console.log('result =>>>', res);
});
</script>
Response
200 response
{
"id": "6765ee6e51edab10072a0826",
"name": "DEMO9",
"slug": "stsgh6du",
"logo_color": "#0C41F3",
"logo_icon": "calendar",
"description": {
"data": {},
"html": "",
"preview": ""
},
"permissions": {
"level": "private_to_me",
"members": [],
"teams": [],
"owners": [
"63a1f65723aaf6bcb564b1f1"
],
"private_to": "63a1f65723aaf6bcb564b1f1"
},
"hidden": false,
"template": null,
"created": "2024-12-20T22:23:42.354523Z",
"created_by": null,
"updated": "2024-12-20T22:23:42.354532Z",
"updated_by": "63a1f65723aaf6bcb564b1f1",
"delete_date": null,
"deleted_by": null,
"status": "active",
"automation_count": 0,
"applications_count": 0,
"last_access": null,
"has_demo_data": false,
"records_count": 0,
"members_count": 8,
"sharing_hash": "Kh1Kb3TElU",
"sharing_enabled": false,
"sharing_password": null,
"sharing_allow_copy": false,
"applications": [
{
"id": "6765ee6e51edab10072a0828",
"name": "Table 1",
"icon": "no-icon",
"solution": "6765ee6e51edab10072a0826",
"slug": "snq0ovvx",
"status": "active",
"structure": [
{
"slug": "title",
"label": "Title",
"field_type": "recordtitlefield",
"params": {
"is_auto_generated": false,
"template": "",
"primary": true,
"max_length": null,
"required": true,
"unique": true,
"placeholder": "Enter record title",
"width": 1,
"is_migrating": false,
"valid": true,
"indexed": false,
"help_doc": null,
"help_text_display_format": "tooltip"
}
},
{
"slug": "description",
"label": "Description",
"field_type": "richtextareafield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": {
"data": {},
"html": "",
"preview": ""
},
"width": 2,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "assigned_to",
"label": "Assigned To",
"field_type": "userfield",
"params": {
"include_filter": false,
"field_filter": {},
"display_format": "image_only",
"notifications_enabled": true,
"linked_application": "members",
"entries_allowed": "single",
"linked_field_slug": "status",
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Enter assign to",
"default_value": [],
"width": 1,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "status",
"label": "Status",
"field_type": "statusfield",
"params": {
"choices": [
{
"label": "Backlog",
"value": "backlog",
"value_order": 1,
"value_color": "#6A849B",
"is_complete": false
},
{
"label": "In Process",
"value": "in_progress",
"value_order": 2,
"value_color": "#FFB938"
},
{
"label": "Ready for Review",
"value": "ready_for_review",
"value_order": 3,
"value_color": "#FF9210",
"is_complete": false
},
{
"label": "Complete",
"value": "complete",
"value_order": 4,
"value_color": "#3EAC40",
"is_complete": true
}
],
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": {
"value": "backlog",
"updated_on": null
},
"width": 1,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "due_date",
"label": "Due Date",
"field_type": "duedatefield",
"params": {
"display_format": "standard",
"linked_field": "status",
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"nested": [
{
"slug": "from_date",
"label": "Start Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
},
{
"slug": "to_date",
"label": "End Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
}
]
},
"nested": [
{
"slug": "from_date",
"label": "Start Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
},
{
"slug": "to_date",
"label": "End Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
}
]
},
{
"slug": "priority",
"label": "Priority",
"field_type": "singleselectfield",
"params": {
"display_format": "importance",
"control_type": "dropdown",
"edit_values": false,
"edit_help_texts": false,
"new_choices_allowed": true,
"choices": [
{
"label": "Urgent",
"value": "urgent",
"value_color": "#FF5757",
"value_order": 0,
"icon_type": "icon",
"weight": 1
},
{
"label": "High",
"value": "high",
"value_color": "#FFB938",
"value_order": 1,
"icon_type": "icon",
"weight": 1
},
{
"label": "Normal",
"value": "normal",
"value_color": "#3EAC40",
"value_order": 2,
"icon_type": "icon",
"weight": 1
},
{
"label": "Low",
"value": "low",
"value_color": "#6A849B",
"value_order": 3,
"icon_type": "icon",
"weight": 1
}
],
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Value",
"default_value": "",
"width": 1,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "first_created",
"label": "First Created",
"field_type": "firstcreatedfield",
"params": {
"display_format": "avatar_date",
"date_format": "standard",
"include_time": false,
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": null,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "last_updated",
"label": "Last Updated",
"field_type": "lastupdatedfield",
"params": {
"display_format": "avatar_date",
"date_format": "standard",
"include_time": false,
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": null,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "followed_by",
"label": "Followed by",
"field_type": "userfield",
"params": {
"include_filter": false,
"field_filter": {},
"display_format": "image_name",
"notifications_enabled": true,
"linked_application": "members",
"entries_allowed": "single",
"linked_field_slug": null,
"required": false,
"unique": false,
"hidden": true,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Enter assign to",
"default_value": [],
"width": 1,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "comments_count",
"label": "Open Comments",
"field_type": "commentscountfield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Enter number",
"default_value": null,
"width": null,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "autonumber",
"label": "Auto Number",
"field_type": "autonumberfield",
"params": {
"include_labels": true,
"suffix": "",
"prefix": "#",
"starting_number": 1,
"leading_zeros": 2,
"primary": false,
"required": false,
"unique": true,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": 0,
"system": true,
"valid": true,
"is_migrating": false
}
}
],
"primary_field": "title",
"order": 219125,
"structure_layout": {
"mode": "fifty_fifty",
"fifty_fifty": {
"rows": [
[
"title",
""
],
[
"description",
""
],
[
"assigned_to",
"status"
],
[
"due_date",
"priority"
]
],
"sections": []
},
"seventy_thirty": {
"seventy": [
"description"
],
"thirty": [
"title",
"assigned_to",
"status",
"due_date",
"priority"
],
"seventy_sections": [],
"thirty_sections": []
},
"hidden_fields": null,
"single_column": {
"rows": [
"title",
"description",
"assigned_to",
"status",
"due_date",
"priority"
],
"sections": []
}
},
"show_all_reports_members": [],
"fields_metadata": {},
"permissions": {
"level": "all_members",
"members": [],
"teams": [],
"permissions_metadata": {}
},
"field_permissions": [],
"first_created": {
"by": "63a1f65723aaf6bcb564b1f1",
"on": "2024-12-20T22:23:42.566000Z"
},
"settings": {
"emails": false,
"meeting_notes": false,
"call_log": false
},
"record_term": "record",
"fields_count": {
"total": 10
},
"record_avatar_field_slug": null,
"hidden": false
}
]
}