Working on a mass button in lightning and using the redirectUrl parameter following the guidelines here. https://community.nintex.com/t5/How-To-s/Drawloop-Create-Mass-Button-in-Lightning/ta-p/92630?lightbox-message-images-92630=5311i52173CB7793B932A
It seems that we can get the user back to our parent record (instead of the deafult jobqueuestatus page) where the list button is pushed but it seems to load our new page in CLASSIC! So we have a framed out classic page layout within the lightning experience.
Is this expected behaviour?
here is code snippet
<apex:page standardController="Enrollment__c" recordSetVar="units"><script src="/soap/ajax/26.0/connection.js"> </script><script src="/support/console/26.0/integration.js"> </script><apex:dataTable value="{!selected}" var="un"> <apex:column > <apex:outputLabel styleClass="ids">{!un.Id}</apex:outputLabel> </apex:column></apex:dataTable><style>.ids{visibility : hidden}</style><script type="text/javascript"> document.addEventListener("DOMContentLoaded", function(event) { var elems = document.body.getElementsByClassName("ids"); var ids = new Array(); for (var i = elems.length - 1; i >= 0; i--) { ids i] = elemsli].innerHTML; } console.log(ids); if (!ids || ids.length < 1) alert('Please select at least one record.'); else { //var instanceName = window.location.hostname; //var newLocation = '/apex/loop__jobqueuestatus'; var newLocation = '/{!Id}'; console.log(newLocation); var redirectUrl = '/apex/loop__masslooplus?'; redirectUrl += '&recordIds='+ids.join(','); redirectUrl += '&sessionId={!$Api.Session_ID}'; redirectUrl += '&retURL='+newLocation; if (sforce && sforce.one && sforce.one.navigateToURL) { sforce.one.navigateToURL(redirectUrl); } else { window.location.href = redirectUrl; } } }); </script></apex:page>