I’m trying to open a List B Form (new item ) in dialog mode from a JavaScript button while creating a new item in List A. E.g. if user can not find Employee name on form drop down list A , it can add it to the employee list by clicking that button, close it and continue form in List A.
However below code is not working. Keeps reopening the same list A form.Any help on how to accomplish this is appreciated.
function fnCreateinItemListB()
{
var parentId = NWF$('#'+currentId).val();
var options = {
title: "My Dialog Title",
url: 'http://sites/Lists/LisB/NewForm.aspx? };
SP.UI.ModalDialog.showModalDialog(options);
}