Used for transparent interaction with server scripts. Example of calling a server method from the client:
await Server.rpc.doSomething();
Calling server methods with arguments of the following types is supported:
boolean
number
string
async function doSomethingWithArgs (n: number, s: string[], b?: boolean): Promise<void> { // ... };
await Server.rpc.doSomethingWithArgs(1, ['a', 'b', 'c'], true);
List of asynchronous functions in server scripts that match the signature:
(...args: any[]) => Promise<void>
Example:
async function doSomething(): Promise<void> { // ... ... ... }
Your review is successfully sent!
Feedback sent successfully
Server Object
Used for transparent interaction with server scripts. Example of calling a server method from the client:
await Server.rpc.doSomething();Calling server methods with arguments of the following types is supported:
boolean;number;string.Example of calling a server method with arguments from the client:async function doSomethingWithArgs (n: number, s: string[], b?: boolean): Promise<void> { // ... };For more information, see the help article [“Scripts in widgets”] (https://brix365.com/en/help/platform/client_server_scripts.html).await Server.rpc.doSomethingWithArgs(1, ['a', 'b', 'c'], true);Hierarchy
Properties
Readonly rpc
List of asynchronous functions in server scripts that match the signature:
(...args: any[]) => Promise<void>Example:
async function doSomething(): Promise<void> { // ... ... ... }