How to open different form from single List or Library control?

Hello, community...!
I want to open diffrent form for single list or library control. like i want to hide new item button and add three button, i know the way to add buttons, but can anyone tell me how can i open diffrent forms to this new buttons?

Dear @harshp924,
The easiest solution is to use Form sets and custom routing. For example, you can store it in some variable in localStorage of the browser, when you open dialog, like this:

localStorage.setItem('formToOpen', '1');

Then, check it in routing conditions:

if (window.frameElement && localStorage.getItem('formToOpen') == '1'){
    //redirect to this form set
    return '8720f859-7cca-4c51-8548-7a28f271d6a8';
}

Thanks @Nikita_Kurguzov
it works for me..!

1 Like