Hello I have a scenario where i need to pass multiple values from the dialogue form to the parent form i am missing something.
kindly find my code below
//Sub form
//**********************************************
////Pass Param After save
//**********************************************
fd.spSaved(function (result) {
//if opened in dialog
if (window.frameElement && Dialog.getArgs()) {
var strSigneeName = fd.field("OutgoingLogPersonSignee").value;
var strSigneeTitle = fd.field("OutgoingLogPersonPosition").value;
var blSigneeIsBishop = fd.field("SigneeIsBishop").value;
var strPlaceOfIssue = fd.field("PlaceOfIssue").value;
var dtSader = fd.field("OutgoingLogDate").value;
//PassParam with new ID
Dialog.close(true, {ID: result.Id, ParamSigneeName: strSigneeName, ParamSigneeTitle: strSigneeTitle, ParamSigneeIsBishop: blSigneeIsBishop, ParamPlaceOfIssue: strPlaceOfIssue, ParamSaderDate: dtSader });
}
});
//*************************************************
//Parent form
//**********************************************
fd.field("BaptismRecordTypeIdFk").ready().then(function () {
return fd.field("BaptismRecordTypeIdFk").ready();
}).then(function () {
return fd.field("BaptismRecordParishNameIdFk").ready();
}).then(function () {
$('.clsOutgoingNewTrs').on('click', function () {
var intRecordTypeID = fd.field("BaptismRecordTypeIdFk").value.ID;
var intParishID = fd.field("BaptismRecordParishNameIdFk").value.ID;
var strVillageTxt = fd.field("BaptismRecordVillageName").value;
var strDescription = fd.field("Title").value;
var strFullLink = "";
//Open form and Pass Parameters
//To change the site link in case of application cloning to another client
strFullLink = "/sites/XXXXXXX/Lists/XXXXXX/newform.aspx";
Dialog.open(strFullLink,
//{ ParmParentForm: 'BaptismForm', ParmRecordTypeID: intRecordTypeID, ParmParishID: intParishID, ParamVillage: strVillageTxt, ParmDescription: strDescription }, function (hasSaved, newID) {
{ ParmParentForm: 'BaptismForm', ParmRecordTypeID: intRecordTypeID, ParmParishID: intParishID, ParamVillage: strVillageTxt, ParmDescription: strDescription }, function (hasSaved,returnedArgs) {
if (hasSaved) {
//Set OutgoingID
fd.field("BaptismRecordCertOutgoingID").widget.dataSource.read();
//fd.field("BaptismRecordCertOutgoingID").value = newID;
fd.field("BaptismRecordCertOutgoingID").value = returnedArgs.ID;
//Set Signee Data From Param
fd.field("BaptismRecordCertGivenByName").value = returnedArgs.ParamSigneeName;
fd.field("BaptismRecordCertGivenbyJobTitle").value = returnedArgs.ParamSigneeTitle;
fd.field("PersonSigneeIsBishop").value = returnedArgs.ParamSigneeIsBishop;
fd.field("BaptismRecordCertPlaceOfIssue").value = returnedArgs.ParamPlaceOfIssue;
fd.field("BaptismRecordCertFromEparchy").value = returnedArgs.ParamSOnBehalf;
fd.field("BaptismRecordCertGivenDate").value = returnedArgs.ParamSaderDate;
}
}, { width: 800, height: 800 });
});
});