Quick Reference
For those of you who just want to jump right in, here are the basic definitions of the SmartSuite scripting SDK functions and a short example.
Please explore the full scripting SDK documentation of each function for more details.
<!--get_current_member-->
<script>
window.SmartSuite.get_current_member().then((res) => {
console.log('member res =>>>', res);
});
</script>
<!--get_table(appId: string, fieldSlugs: string[]): Promise<SimpleRecord | undefined>;-->
<script>
window.SmartSuite.get_table('67161745a504292e31e25ad5', ['title']).then((res) => {
console.log('result =>>>', res);
});
</script>
<!--get_record appId: string, recordId: string, options?: GetRecordOptions-->
<script>
window.SmartSuite.get_record('67161745a504292e31e25ad5', '6740a4eb96b9e63d42ff9fed').then(
(res) => {
console.log('result =>>>', res);
}
);
</script>
<!--{"id":"6740a4eb96b9e63d42ff9fed","status":{"value":"ready_for_review","updated_on":null}}-->
<!--update_records(appId: ID, id: ID, body: SimpleRecord, options?: UpdateRecordOptions ): Promise<SimpleRecord | undefined>;-->
<script>
window.SmartSuite.update_records('67161745a504292e31e25ad5', '6740a4eb96b9e63d42ff9fed', {
id: '6740a4eb96b9e63d42ff9fed',
status: { value: 'ready_for_review', updated_on: null },
}).then((res) => {
console.log('result =>>>', res);
});
</script>
<!--create_records(appId: ID, body: SimpleRecord, options?: UpdateRecordOptions ): Promise<SimpleRecord | undefined>;-->
<script>
window.SmartSuite.create_records('67161745a504292e31e25ad5', {
id: '6740a4eb96b9e63d42ff9fed',
title: 'new title',
status: { value: 'ready_for_review', updated_on: null },
}).then((res) => {
console.log('result =>>>', res);
});
</script>
<!--get_solution(solutionId: string, options?: RequestOptions | string[]): Promise<SolutionsModel>;-->
<script>
window.SmartSuite.get_solution('67161745a504292e31e25acf').then((res) => {
console.log('result =>>>', res);
});
</script>
<!--list_views(appId: ID, fieldSlugs?: readonly string[]): Promise<Report[]>;-->
<script>
window.SmartSuite.list_views('674587caf64e11aadd7a7564').then((res) => {
console.log('result =>>>', res);
});
</script>
<!--list_teams(filter?: GroupFilter, fieldSlugs?: string[]): Promise<SimpleRecordList>;-->
<script>
window.SmartSuite.list_teams().then((res) => {
console.log('result teams =>>>', res);
});
</script>
<!--list_members(filter?: GroupFilter, fieldSlugs?: string[]): Promise<SimpleRecordList>;-->
<script>
window.SmartSuite.list_members().then((res) => {
console.log('result members =>>>', res);
});
</script>
<!--list_comments(appId: ID, recordId: ID): Promise<ListCommentsResponse>;-->
<script>
window.SmartSuite.list_comments('67161745a504292e31e25ad5', '6740a4eb96b9e63d42ff9fed').then(
(res) => {
console.log('result =>>>', res);
}
);
</script>
<!--list_tables( solutionId?: ID, fieldSlugs?: string[]): Promise<ApplicationModel[]>-->
<script>
window.SmartSuite.list_tables('67161745a504292e31e25acf', ['name']).then((res) => {
console.log('result =>>>', res);
});
</script>
<!--list_solutions(fieldSlugs?: string[]): Promise<SolutionsModel[]>-->
<script>
window.SmartSuite.list_solutions().then((res) => {
console.log('result =>>>', res);
});
</script>
<!--delete_record(appId: ID, ids: ID[], options?: DeleteRecordsOptions): Promise<SimpleRecord[]>;-->
<script>
window.SmartSuite.delete_record('67161745a504292e31e25ad5', ['6745811cf64e11aadd7a750c']).then(
(res) => {
console.log('result =>>>', res);
}
);
</script>
<!-- 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>