Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These snippets are somewhat self-explanatory. Notice usage of Notifications API with builder pattern.

Take a look in Notification (Technical User Reference (Notifications) for API reference.

Code Block
breakoutModewide
languagegroovy
// Simple success notification with a link to the quote
user = api.user("loginName")
quote = "896.Q"

api.notificationApi()        
      .withRecipient(api.user("loginName"))        
      .withTitle("Quote review requested ")        
      .withSuccessStatus()        
      .withSource("896.Q")      
      .withContextLink("Go to P-896", AppPages.QC_DETAILS_PAGE, "896.Q")      
      .withDownloadActionType("asyncdownloadmanager.download/Pricefx_seeddata_DMDS_Customer_20221111_100755_nvgg4.zip")        
      .withMessage("Quote created by $user needs your attention.")        
      .send()

...