Is it possible to get the form name which the PCF control is embedded within via the context object?
Thanks
HI @SP123456 ,
even if you get the name of the form somewhere in the PCF context, it would be unuspported.
The supported way would be to add a dummy field to your PCF (something like "formName") and use form scripting to grab the form name (as @MayankP suggested) and set that value for a dummy column associated with the PCF "formName" property.
Hope this helps!
Hi @SP123456
you can get FormContext from executioncontext ...
ExecutionContextObj.getFormContext()
and then many be get current form as below..
formItem = formContext.ui.formSelector.getCurrentItem();
and then can access form label like formItem.GetLabel()
refer following article for more information
Hope this helps..
WarrenBelz
87
Most Valuable Professional
mmbr1606
71
Super User 2025 Season 1
Michael E. Gernaey
65
Super User 2025 Season 1