Page 1 of 1

newForm to DisplayFOrm

Posted: 04 Apr 2016
by Malboro
hi,

Affer creation of new element(NewForm pop-up) i want to redirect to displayForm(pop-up) but i don't have id

Can you help me please?

Re: newForm to DisplayFOrm

Posted: 04 Apr 2016
by rostislav
Yes, please follow this how-to: http://spform.com/forms-designer- ... sharepoint

You will, of course, need to use the display form's name instead of the edit form's name in the code.

Re: newForm to DisplayFOrm

Posted: 04 Apr 2016
by Malboro
i try this but don't work

my code:

fd.onsubmit(function() {
fd.field('ID_Affire').readonly(false);

fd.field('N_Comm_Interne').readonly(false);
fd.field('N_Affaire').readonly(false);
fd.field('Date_Commande').readonly(false);
fd.field('Soci_x00e9_t_x00e9_').readonly(false);
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Élément_DisplayForm.aspx?ID=');
fd.sourceFormParam(uri);

return true;

});

Re: newForm to DisplayFOrm

Posted: 04 Apr 2016
by rostislav
What constitutes as 'not working'? This code will work unless you either have an error in your code - check the console, the name of the form is incorrect or maybe some other problem coming from somewhere else (maybe you've not added this code to the correct form).

1. Check the code is executing via alert messages
2. Check that the name of the form is correct

Re: newForm to DisplayFOrm

Posted: 04 Apr 2016
by Malboro
alert of uri link:

Image

Image

Re: newForm to DisplayFOrm

Posted: 04 Apr 2016
by rostislav
That's not how you check the name of the form. See the small screenshot at the bottom of the article.

Re: newForm to DisplayFOrm

Posted: 04 Apr 2016
by Malboro
I have list A and list B.

On displayform of list A I created related Items(list B)

when i create new item (listB) i want to open pop-up of displayform(listB) on displayform(listA).

i check name of display form on sharepoint designer

link of alert(uri)

http://postimg.org/image/euzvwjc0n/

link of scrrenshot form of list B in sharepoint designer

http://postimg.org/image/lakbnzxxf/

Re: newForm to DisplayFOrm

Posted: 05 Apr 2016
by Dmitry Kozlov
Hi,

You cannot use FDRedirectWithID parameter in dialogs because a dialog closes right after creating a new item. Why do you need to display just created item in a dialog? It will appear in the list of related items.