The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.


Creates and initializes an LWR router.

Method InputTypeRequired/OptionalDescription
configRouterConfig objectOptionalPass in the RouterConfig object you want to create a router for. If you don't specify a RouterConfig, LWR creates a router with default values.

We recommend that you specify a RouterConfig for createRouter(). If you don't pass in a value for RouterConfig.routes, the router can't match any locations.

See Also