Hi everyone,
I want to make a sound alert on the receipts page when entering the barcode and the item is not defined before going to the search screen
I will explain what I did
added the folder SoundExtension
subFolder GetScanResultClientRequest
in GetScanResultClientRequest folder
GetScanResultClientRequest.ts ``
import { GetScanResultClientRequestHandler } from "PosApi/Extend/RequestHandlers/ScanResultsRequestHandlers"
import { GetScanResultClientRequest, GetScanResultClientResponse } from "PosApi/Consume/ScanResults"
export default class GetScanResultClientRequestHandlerExt extends GetScanResultClientRequestHandler {
public executeAsync(request: GetScanResultClientRequest<GetScanResultClientResponse>): Promise<Commerce.
Client.Entities.ICancelableDataResult<GetScanResultClientResponse>> {
let req: GetScanResultClientRequest<GetScanResultClientResponse> =
new GetScanResultClientRequest<GetScanResultClientResponse>(request.scanText);
System.Media.SystemSounds.Beep.Play();
return this.defaultExecuteAsync(req);
// throw new Error("Not implemented");
}
}``
manfest.jeson ``
{
"$schema": "../schemas/manifestSchema.json",
"name": "Pos_Sound_Samples",
"publisher": "Microsoft",
"version": "7.2.0",
"minimumPosVersion": "7.2.1746.0",
"extend": {
"soundalart": [
{
"apiType": "GetScanResultClientRequest",
"modulePath": "GetScanResultClientRequest/GetScanResultClientRequest"
}
]
}
}``
First, how do I know if the item is not found?
Second, how do I stop going to the search screen if there is no category?
Third, how do I make a sound alert?
Tried System.Media.SystemSounds.Beep.Play();
I don't know why he doesn't recognize him even though he is supposed to be working in .net 2.0
Unfortunately, there is no explanation on the site
docs.microsoft.com/.../pos-apis

Report
All responses (
Answers (