Recently, we came across a new method in PCF – retrieveRecordCommand. This method will help us to retrieve the related commands for specific record(s). It also gives the flexibility to retrieve only specific commands that the user wants to see.
So, let’s see a scenario in which this method would come handy. Let’s say we want to show a PCF Dataset Component in a sub grid without the OOB Command Bar, which is very much possible. But what if we also want to execute some of the OOB commands in some events. This is where the retrieveRecordCommand method would save the day.
Using this method, you can retrieve the commands and once you have access to those commands, you can even trigger them by using the execute method.
Given below are the few parameters for the retrieveRecordCommand method.
Now let’s see how we can accomplish the above scenario.
Working:
We have a sub grid of Contacts on Account, where we have configured our Detail List Fluent UI component. Above the…