Auto assign related items with Safari
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Alex,
Not sure if there is an issue with Safari specifically, but when you create Child from the New Form - there is no way to populate Parent Field directly (there is no ID yet), so it populates hidden field instead, and then during saving it will link the items together.
Here's a video example - https://www.youtube.com/watch?v=rd8g6Zu1H_E
Not sure if there is an issue with Safari specifically, but when you create Child from the New Form - there is no way to populate Parent Field directly (there is no ID yet), so it populates hidden field instead, and then during saving it will link the items together.
Here's a video example - https://www.youtube.com/watch?v=rd8g6Zu1H_E
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Alex,
Are you sure the issue is with the Safari browser? Does it work with Google Chrome for example?
Are you sure the issue is with the Safari browser? Does it work with Google Chrome for example?
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Alex,
Unfortunately not. Can you, please, try to open the Edit form in Safari, try to add an item, and open browser's console? There should be an error related to the problem, please, send us a screenshot of the error, if it is there.
Unfortunately not. Can you, please, try to open the Edit form in Safari, try to add an item, and open browser's console? There should be an error related to the problem, please, send us a screenshot of the error, if it is there.
Cheers
Hi Nikita,
I tried display form and edit form, there is only sometimes a error on the edit form (see 2nd screen shot).
any ideas?
It would be possible to create a similar site for you, probably would be more helpful?
br, Alex
I tried display form and edit form, there is only sometimes a error on the edit form (see 2nd screen shot).
any ideas?
It would be possible to create a similar site for you, probably would be more helpful?
br, Alex
- Attachments
-
- error msg
- Screen Shot 2018-08-20 at 09.40.39.png (197.27 KiB) Viewed 1992 times
-
- site with console
- Screen Shot 2018-08-20 at 09.29.34.png (217.37 KiB) Viewed 1992 times
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi Alex,
Could you provide your code from the child form?
Could you provide your code from the child form?
Hi Dmitry,
yes, I have this inside the JavaScript Editor
and additional JS code via linked script:
yes, I have this inside the JavaScript Editor
Code: Select all
if (window != window.top && window.top.fd) {
// the form is opened in a dialog from the parent form
var parentId = window.top.GetUrlKeyValue('ID');
if (parentId) {
// the form is opened from the Edit form
fd.field('AssignedTicket').value(parentId);
} else {
// the form is opened from the New form
$('#_fd_parent_temp > input').val(window.top.fd._tempParentId());
}
$('.parent-ticket').hide();
}
Code: Select all
if (typeof jQuery == "undefined") {
jQuery = Plumsail.FD.jQuery;
}
window.TicketPartnerID = ((_spPageContextInfo.webAbsoluteUrl).replace(_spPageContextInfo.siteAbsoluteUrl, "")).replace(/\D/g, '');
var success = false;
jQuery(document).ready(function () {
fd.onsubmit(function () {
var postURL = "https://prod-16.westeurope.logic.azure.com:443/workflows/xxxxxxxxxx/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=yyyyyyyyyyyyy";
var data = JSON.parse('{"partnerID":"' + parseInt(window.TicketPartnerID) + '","ticketID":"' + window.top.GetUrlKeyValue('ID') + '","title":"' + fd.field("Title").value() + '","author":"' + _spPageContextInfo.userDisplayName + '","userId":"'+_spPageContextInfo.userId+'"}');
if (!success) {
jQuery.ajax({
url: postURL,
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/json"
},
data: JSON.stringify(data),
success: function () {
console.log("azure call successful.");
success = true;
fd.save().click();
}
});
}
if (success) {
return true;
}
return false;
});
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 22 guests