startActivity

Indicates that you start an activity that should be logged to the website log database when it is finished. Returns the function that should be called when the activity is completed.

import { startActivity } from "@olenbetong/appframe-core";

async function runExport(domain: string) {
	try {
		let logActivity = startActivity("Export", { Domain: domain });
		await procExport.execute({ Domain: domain });
		logActivity();
	} catch (error) {
		alert(error.message);
	}
}

API

export declare function startActivity(activity: string, parameters: Record<string, any>): () => Promise<void>;

Last updated

Was this helpful?