To return the new purchase order internal id from your suitelet you will need to write it on the response :
response.write(purchaseOrderId);
You can catch that value from your client side script :
var response = nlapiRequestURL(url); // run response validation if (response.getCode() == 200) { var purchaseOrderId = response.getBody(); }
Then you can redirect to your purchase order page :
var purchaseOrderUrl = nlapiResolveURL('RECORD', 'purchaseorder', purchaseOrderId); window.location = purchaseOrderUrl;