Freedom UI send a record ID to another page

Hello. I'm trying to configure a button for Freedom UI that should open a page and pass a parameter (the ID of the page from which the button was clicked) to the new page. But none of the options I've found have worked. Maybe someone can help.

Here's what I'm trying to do:

When the button is clicked:

    handler: async (request, next) => {
      const recordId = await request.$context.Id;
      const handlerChain = sdk.HandlerChainService.instance;
      await handlerChain.process({
        type: "crt.OpenPageRequest",
        schemaName: "UsrAccountContactsForPortal_Minipage",
        $context: request.$context.Id,
      });
 
      return next?.handle(request);
    }

When the page is initialized:

	{
		request: "crt.HandleViewModelInitRequest",
		handler: async (request, next) => {
			const recordId = await request.$context.Id;
			console.log("Received Id:", recordId);
			return next?.handle(request);
		}
	}

Thank you.

Like 0

Like

0 comments
Show all comments