This topic contains 6 replies, has 0 voices, and was last updated by KCSF Bud 8 years ago.
-
AuthorPosts
-
November 2, 2016 at 1:56 pm #1580
KCSF BudThis might be a little general…but doing some testing to start to learn SS 2.0 – I have a very simple pageInit client script that just returns an alert in the UI. I don’t reference the record type in any way in the script and have deployed it in Test mode to purchase orders and sales orders. Works for POs but not SOs. If I am accurate in saying that my script is basically independent of record type….any ideas on what might cause this? We do have quite a few more 1.0 scripts and workflows running on sales orders than POs, could that somehow be causing a conflict?
Probably not enough detail, I know, just seeing if there were ideas before I bang my head on the desk some or file a case.
This is a cached copy. Click here to see the original post. -
November 2, 2016 at 1:57 pm #1581
al3xiconDo you get an error in your browser console, or does it just fail silently? Can you post your entire script contents for us to view?
-
November 2, 2016 at 2:22 pm #1582
KCSF BudNo error in browser console that i can detect, just silent almost as if its not deployed. I guess I could create a problem in the script and see what that does.
Code:
/**
* @NApiVersion 2.0
* @NScriptType ClientScript
*/
define([],
/**
* @param {email} email
* @param {dialog} dialog
*/
function() {/**
* Function to be executed after page is initialized.
*
* @param {Object} context
* @param {Record} context.currentRecord – Current form record
* @param {string} context.mode – The mode in which the record is being accessed (create, copy, or edit)
*
* @since 2015.2
*/
function pageInit(context) {
alert(‘Hmm’);
log.debug({
details : ‘I am a debug log’
})
var order = context.currentRecord;}
return {
pageInit: pageInit,
// fieldChanged: fieldChanged,
// postSourcing: postSourcing,
// sublistChanged: sublistChanged,
// lineInit: lineInit,
// validateField: validateField,
// validateLine: validateLine,
// validateInsert: validateInsert,
// validateDelete: validateDelete,
// saveRecord: saveRecord
};});
-
November 2, 2016 at 3:03 pm #1583
david.smithHow many scripts do you have on SO? Can you deploy to other record types too?
-
November 2, 2016 at 3:28 pm #1584
KCSF BudI will test other record types. About 30 client/user event scripts on sales orders, all 1.0. Mostly user event submit stuff, nothing that is pageInit.
-
November 3, 2016 at 4:54 am #1585
fjannelleOnly the first 10 client-side scripts will execute on a specific record type. This is likely to be your issue here. You can check the Scripted Records, select Sales Order and reorder the scripts as needed. A consolidation of scripts will eventually be needed (ex: combine all 1.0 scripts Save Record trigger into a single script).
Best regards,
KCSF Bud replied on 11/03/2016, 06:53 AM: I confirm that moving test script to top of list allowed it to execute. Thank you.
-
November 3, 2016 at 6:20 am #1586
KCSF BudGood to hear, I suspected it was something like that just couldn’t find it published anywhere. I will turn off a few/re-order to confirm and then start the consolidation. Such an exciting project for the weekend!
-
AuthorPosts
You must be logged in to reply to this topic.