anybody knows if it's possible to render a form th...
# suitescript
m
anybody knows if it's possible to render a form that was already created for a custom record from a suitelet?
c
Are you talking about loading the record with that form pre-selected on a redirect from a suitelet or actually rendering the custom record in a suitelet in the layout of the custom form? That latter I don't think is possible unfortunately.
m
the latter, yeah, that's what i guessed and researched too 😕
r
why don't you redirect them to the custom record in edit mode if its already saved
👍 1
c
It doesn't even necessarily have to be saved yet, you can redirect to the form on create like this
Copy code
function redirectToNewRecord(objParameters)
		{
			//Get the environment internal ID for the record record type
			var objRecord = record.create({
				type: 'customrecord_record'
			});
			var stRecordId = objRecord.getValue({fieldId: 'rectype'});

			redirect.toTaskLink({
				id: 'EDIT_CUST_' + stRecordId,
				parameters: objParameters
			});
		}
r
what is the use case if these answers didnt help. Are you trying to use a custom form but do extra stuff in your suitlet?
m
the use case is a weird one, we have a huge custom record that has sublists, once we click on New XX Record while creating the parent we get redirected to that page. We are trying to avoid that by opening a suitelet on a popup instead of on the same page so the data doesn't get lost, the idea of the suitelet is to have more control but we can always just control it on a client script