Question about URL parameters: I know that when c...
# suitescript
s
Question about URL parameters: I know that when creating a record, we can set defaults for certain fields using the
record.field_id
as a query parameter in the URL. We are going through a large rebranding and everyone’s email address is changing. We have an external client that can call a Restlet which determines, based upon the input email, if an employee record exists with that email. We don’t change it automatically, because we don’t want to give the Restlet role Employee Edit permissions, so what we want instead is for it to generate an email with a clickable URL to be sent to an Admin group, so they can review and process them manually. I would like to have the URL open the employee in edit mode AND automatically change the email address to the new one if possible, to speed things up and reduce copy-paste errors. It seems that the
record.field_id
trick doesn’t work for editing an existing employee record. Is there any way to do it, or are we stuck copying and pasting from the email message?
n
You could potentially put a client script on pageInit deployed to the employee record. Then put a custom parameter in your link. Called like email override or whatever you want. Then the client script looks for that parameter on pageInit and if it’s there, populates the field you want
☝️ 1
s
ah, that’s a great idea, thanks! I’ll have to test it out, but it seems like it would work
🫡 1
this worked perfectly, btw, thanks for the suggestion!
🫡 1