proofgeist/fmdapi

How to switch between layouts?

Closed this issue · 1 comments

is with the ".layouts" function? because as it says to list layouts and not to switch between layouts.

I think the function you found is for the metadata. It allows you to see all the layouts within a system, but not retrieve data from them

Each Data API call can only go against a single layout. If you want data from another layout, you'd have to make a new API call.

I highly suggest using the code generation features for the best experience. You define all the layouts you want to use up front and then it will generate a layout-specific client for each layout, then you just use the client based on the data you want to retrieve (UsersClient.list(), InvoicesClient.find(), etc). Then you also get the great benefits of type-safe data return and autocomplete for all the field names from these calls.

I hope this helps!