This topic contains 8 replies, has 0 voices, and was last updated by johngraham 7 years, 7 months ago.
-
AuthorPosts
-
April 4, 2017 at 10:34 am #21714
johngrahamAnyone aware if it is possible to add a custom notice or banner similar "Warning This record may have duplicate" on a record (sales order, customer) based off of custom code?
This is a cached copy. Click here to see the original post. -
April 4, 2017 at 10:37 am #21715
david.smithSuiteScript 2.x module called N/ui/message module
https://netsuite.custhelp.com/app/an…ail/a_id/49316
-
April 4, 2017 at 4:28 pm #21716
CREECEYou can. I did this with some code earlier.
In my UE script on the record, I check a particular request param and show a banner like:
Code:
var fieldObj = form.addField('custpage_editunavailable', 'inlinehtml', ' ');
fieldObj.setDefaultValue('<div id="div_alert"><div style="" class="uir-alert-box alert" width="100%" role="status">' +
'<div class="icon alert"></div><div class="content"><div class="title">YOUR TITLE MESSAGE HERE</div>' +
'<div class="descr">YOUR DESCRIPTION MESSAGE HERE</div></div></div></div>');
fieldObj.setLayoutType('outsideabove', 'startrow');
Looks like the below screenshot. Just change the class to be the one you want. -
April 4, 2017 at 5:22 pm #21717
michoelAnother option for SS1.0 is to use the undocumented internal Netsuite function showAlertBox() in your client side code.
Code:
showAlertBox('alert_duplicate_record', 'Warning – This record may have duplicate', 'This record may have duplicates.', NLAlertDialog.TYPE_HIGH_PRIORITY);
CREECE replied on 04/05/2017, 11:23 PM: Either way it is a bit shady I didn’t know about this method until now though thanks for the info!
-
April 5, 2017 at 5:36 am #21718
chanarbonI think CREECE 's solution should work really well. It is a better approach to use what we have on the APIs provided rather than using the functionalities that are not directly shown on the documentation to ensure that the codes logic will work even if there will be some changes in the UI components
michoel replied on 04/05/2017, 05:16 PM: Note though that @creece’s solution also makes use of undocumented Netsuite CSS classes that are also subject to changes.
-
April 5, 2017 at 9:26 am #21719
johngrahamThanks for all the input. CREECE , I want to add this to a standard sales order and not a custom form. Any ideas?
-
April 5, 2017 at 10:48 am #21720
ERPExpertsOriginally posted by johngraham
View Post
Thanks for all the input. CREECE , I want to add this to a standard sales order and not a custom form. Any ideas?
A Before Load UserEvent which adds a new field on the Page, and sets the default value to the previous post's value.
Deploy this script then to the Sales Order Record Type.
-
April 5, 2017 at 10:59 am #21721
ERPExpertsOriginally posted by michoel
View Post
Another option for SS1.0 is to use the undocumented internal Netsuite function showAlertBox() in your client side code.
Code:
showAlertBox('alert_duplicate_record', 'Warning – This record may have duplicate', 'This record may have duplicates.', NLAlertDialog.TYPE_HIGH_PRIORITY);Ah I was looking for this! Thanks Michoel!
-
April 5, 2017 at 11:22 am #21722
johngrahamFantastic! Works as expected. Thanks again for everyone's help.
-
AuthorPosts
You must be logged in to reply to this topic.