Can Any one please help me out in IF i am creating...
# general
a
Can Any one please help me out in IF i am creating a button on invoice record and on clicking that button it function same as netsuite native copy button but only thing change is we provide conformation box that "Do you want to copy same record" if yes then copy the same record but dont get save let user get saves that record but when it is NO then copy the same record except customer field and let user fills the customer field ,i want it to function as native NS copy button except above customization. can any one help me out
b
take a look at the url that netsuite uses when it copies a record
use the same thing for your button
use the same url with Window.location
the usual would be a client script on the invoice to unset entity, but you may able to use the
record.entity
url query parameter to set/unset the customer
keep in mind that the entity is a primary field that sources a lot of other fields, a lot of fields may get unset on a changed entity
i personally would advise using Window.confirm for your prompt if you can get away with it
a
Very Very thankful for your comment sir ,i ll definately work
but sir we i want all the field must be populated on new copy except customer and subsidiary field and record should not get save we manually save that record
b
the copy button that netsuite has just redirects to a different url
you will be doing the same thing
a
yes it redirects but it save the record i dont want to be saved i want the page to be open that filled with values except that customer field
b
whats the url you are redirecting to?
a
sir i want only want sir when we click on that button a new window will open same as thwt when i click on create new customer ,in that window all fields are blank ,i need same but instead of all fields are empty all field should filled with previous record except the customer field and as user will set the customer and save the record
b
take your pick on how you want to implement it
the first choice is make it an actual copy
in which case you use the same method netsuite uses, you navigate to a url that does the copying
it matters little whether you navigate in the current window or a new window
a
ok sir i ll give u example
when we create script record , there is a add button as hen we click on it it popups a window in that there is a folder choose option file name option and many more but it not get save directly we upload file and fill mandatory field same like that i need popup of customer record and all field should filled except customer ,user will fill that customer record and then save ,just same as we create script record
b
seem reasonable, except i think you replaced the word invoice with customer
a
like this
b
if you want, you can make a suitelet to make your choice of customer
but you can just do the same as the copy action, except leave the customer blank
either way requires you learning how the url works for copying records
so you might as well start there
a
we want the button on every customer record ,and when user clicks ,that record date will auto fill on the popup record except customer
b
you are consistently using customer record here
so im not sure what you are asking for here
originally you asked how to make a copy of an invoice minus the customer
so you would need to learn how the url for copying works
a
yes but record should not get save
it put on user to save
b
i dont believe you have ever copied an invoice if you think it automatically saves
a
i tried clicking copy button
it create and saves it
b
which is why i asked what url you are using
a
yeah yeah sir , ok sir i ll append it through url let see and sir thanks for your answers👍🙂
Open New Sales Order record on button click from parent Sales Order and pass values of multiple fields from Parent record and map all the field automatically except customer the new sales order NOT save but open in the browser so the user can complete some mandatory fields
Sir i want this ,now you understand me clearly
b
figure out how the copy button url works
if that fails, you have to replicate copying yourself, which is going to be a lot of work
a
I think i have to do this manually
b
good luck, thats way more work than figuring out what the copy url is
a
i am passing data from UE script to CS script but button which is press the function that invoke on client script within that scope i have access of json data which i am passing from client script ,pageInit also not working fieldChange dalso not working
b
what did your attempt look like
the article you shared looks to be mostly padding, it could have used window.open to pass the parameters from the parent to the child
instead it passes the id and does a search for the fields instead
there are better options for controlling the url clientside than there are serverside
a
Sir above solution is wrong i tried it ,pageInit or any netsuite function dont work it only work custom function.its not possible frommco=lient script
sir is there any way to access current record after button click on new window so that i can manually set record in field through script and only user needs to set customer field and set
b
you havent shared your setup, but my guess is that you havent deployed both scripts