Auto expand factbox in d365

Hi Experts,

Good day!!

I have tried the below code to auto expand the factboxpart in my form but its not working.

[FormEventHandler(formStr(TSTimesheetEntry), FormEventType::Initialized)]
public static void TSTimesheetEntry_OnInitialized(xFormRun sender, FormEventArgs e)
{
sender.expandFactBoxPaneAtStart();
PartList       partListFactBox  = new PartList(sender);
FormRun     formRunFactBox = partListFactBox.getPartById(1);
formRunFactBox.expandFactBoxPaneAtStart();
}

Please help me on this.

Thanks in advance,
Mark

Hi @MartinDrab, Could you please help me on this

Thanks,
Mark.

I’m not familiar with expandFactBoxPaneAtStart() method, but the name sounds like if it should expand the panel with fact boxes, not to expand a particular fact box.

Hi Martin,

Thanks a lot for the reply,

Mark.