Corrected way to get url link for creating a new record.

====== PLEASE IGNORE THIS. I EDITING IN THE WRONG METHOD =======
We discovered there was an error getting the $url value. We have fixed this here for when $params == null but it may also be required for when $params !== null.