This topic contains 3 replies, has 0 voices, and was last updated by chanarbon 7 years, 6 months ago.

  • Author
    Posts
  • #1727

    peterbell

    Hi all

    I have a script that puts the messages at the top of the page that I have now been asked to have show in view mode. Is it possible to get banner messages showing when a record is viewed not just edited?

    Code:
    var refMessage = message.create({
    type: message.Type.WARNING,
    title: openReferrals+” Open Referral(s)”,
    message: “Please note: there are open referrals associated with this Opportunity.”
    });

    refMessage.show();
    Cheers

    Peter
    This is a cached copy. Click here to see the original post.

  • #1728

    MChammaTX

    Sort of. I recommend you vote for enhancement 387483 but a workaround was suggested here

  • #1729

    david.smith

    You would have to create a user event script that adds the javascript to the page. Then you could use the require like this:

    Code:
    require([‘N/ui/message’],function(msg){

    var refMessage = msg.create({
    type: msg.Type.WARNING,
    title: ” Open Referral(s)”,
    message: “Please note: there are open referrals associated with this Opportunity.”
    });

    refMessage.show();
    })

  • #1730

    chanarbon

    More or less you could get the form object from the beforeLoad context then use either clientScriptModulePath or clientScriptFileId to set the client script that will perform that functionality

You must be logged in to reply to this topic.