In google app script, making a copy of a spreadsheet that contains a linked Form used to also copy the linked Form when you copied between two different Google free consumer accounts. That appears to no longer be the case.
In the example below, getFormUrl returns null. What is a work-around to copy the linked Form along with the Spreadsheet like it used to?
// from a 2nd google consumer account, get file by ID of a master
// spreadsheet in a different user account that contains a linked Form
var masterSpreadsheetFile = DriveApp.getFileById('1Jeh4b0BrF4qjogErZpd-bnnoVhLdRj2-hfwXy.....');
// make a copy of the master for this 2nd free google consumer account user
var copiedSpreadsheetFile = masterSpreadsheetFile.makeCopy('myCopiedSpreadsheet', 'MyFolder');
// set the name of the Copied linked Form
var copiedSpreadsheet = SpreadsheetApp.open(copiedSpreadsheetFile);
var copiedFormUrl = copiedSpreadsheet.getFormUrl(); // fails here
var copiedFormId = getIdFromUrl(copiedFormUrl);
var copiedFormFile = DriveApp.getFileById(copiedFormId);
copiedFormFile.setName('myNewCopiedForm');
enter code here
Copying a sheet via the GUI within the same user account DOES copy the linked Form.