Synchronize Entity Support in form page

To open entity to the same page, create a new constructor in FormPage with SynchronizeEntity .  This will refresh the form after a new row is selected from master page grid.

public FormPage(SynchronizeEntity syncEntity)
:base(true, syncEntity)
{
    InitializeComponent();
    InitPage(api);
}
private void SetHeader()
{
    if (editrow == null)
    return;
    var header = string.Format("{0}:{1}", Uniconta.ClientTools.Localization.lookup("DebtorAccount"), editrow._Account);
    SetHeader(header);
}

protected override void SyncEntityMasterRowChanged(UnicontaBaseEntity args)
{
    InitMaster(args);
}

private void InitMaster(UnicontaBaseEntity row)
{
    layoutItems.DataContext = null;
    layoutItems.DataContext = editrow;
    SetHeader();
}

And then from Master Page where form page opens, pass SynchronizeEntity

AddDockItem("PluginAddEditDebtor", debtorGrid.syncEntity, string.Format("{0}_{1}", Uniconta.ClientTools.Localization.lookup("DebtorAccount"), selectedItem.Account));