Show / Hide Table of Contents

Class Trigger

Methods

ChatAfterSaveNewMessage

(403) Called after a chat message is saved.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
chatSession.topicIdthe topic this chat session belongs to
chatSession.userIdejUser ID
chatSession.customerIdperson ID
chatSession.customerNameperson name
chatSession.customerEmailperson email
chatSession.companyNamecompany name
chatSession.customerPhoneperson phone
chatMessage.sessionIdsession
chatMessage.idmessage ID
chatMessage.messagemessage text
chatMessage.typetype of message (enum)
chatMessage.specialTypeSpecial type of message (enum)
chatMessage.specialParamdepends on type
chatMessage.authorauthor name

The message has a list of clickable options. Options are as JSON array in specialParam.

Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("chatSession.userId");
String param2 = ed.getInputValue("chatMessage.id");
String param3 = ed.getInputValue("chatMessage.message");
print("Params: " + param1 + " " + param2);

ChatBeforeSaveNewMessage

(402) Called before a chat message is saved.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
chatSession.topicIdthe topic this chat session belongs to
chatSession.userIdejUser ID
chatSession.customerIdperson ID
chatSession.customerNameperson name
chatSession.customerEmailperson email
chatSession.companyNamecompany name
chatSession.customerPhoneperson phone
chatMessage.sessionIdsession
chatMessage.messagemessage text
chatMessage.typetype of message (enum)
chatMessage.specialTypeSpecial type of message (enum)
chatMessage.specialParamdepends on type
chatMessage.authorauthor name

The message has a list of clickable options. Options are as JSON array in specialParam.

Output values

VariableDescription
chatMessage.message
chatMessage.specialTypeSpecial type of message
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("chatSession.userId");
String param2 = ed.getInputValue("chatMessage.id");
String param3 = ed.getInputValue("chatMessage.message");
print("Params: " + param1 + " " + param2);

ChatNewSession

Fires when a new chat session starts.

Corresponds to the webhook chatsession.created event.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
chatSession.idsession ID
chatSession.topicIdthe chat topic this chat session belongs to
chatSession.customerAliasperson name from form
chatSession.sessionKeysecret key
chatSession.customerHosthostname
chatSession.statussession status (enum)
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("chatSession.id");
String param2 = ed.getInputValue("chatMessage.id");
String param3 = ed.getInputValue("chatMessage.message");

ChatSessionChangedStatus

(401) Called when session changes status. Equivalent to webhook chatsession.changed.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
chatSession.idthe session ID
chatSession.statusnew status (enum)
Examples
#setLanguageLevel 3;
String param1 = getVariable("chatSession.id");

CompactModeInjection

(200) Add custom stuff to our CompactMode client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

none

Output values

VariableDescription
injectionOutput string to inject into parser as variable.
Examples
#setLanguageLevel 3;
print("window.alert('foo!');");

CustomerCenterAuthentication

(210) Called when customer logs into Customer centre.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
usernameuser string
targetIdtemporary key info ID (optional)
Output values
VariableDescription
navigateToset to URL to redirect to
Examples
#setLanguageLevel 3;
String param1 = getVariable("personId");

CustomerSetSubscriptions

(302) Called when setting subscriptions from Manage subscription page.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
personIdperson ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("personId");

DbiTaskFailed

(301) Called when a DBI task fails to execute successfully.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdthe dbi agent schedule ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("entryId");

ImportMailAfterProcessing

(304) Called after email is processed by email filters and save to the system.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
messageIdmessage ID (int)
ticketIdrequest ID
customerIdThe ID of the primary person connected to this ticket
customerEmailEmail address of the primary person connected to this ticket
mailBackupRaw version of the email
filterIdfilter ID
toto header value
fromfrom header value
isNewCustomerset to 1 if this email created a new customer/person (0/1)

In addition, any variables set by the email filter are also available with the name specified in the email filter.

Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

ImportMailBeforeProcessing

There are several variables available in this context.

  • To get a variable:getVariable("xxx")
  • To set a variable:setVariable("xxx", <value>), where <value> is a valid value for the field you are trying to set.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
subjectmessage subject
bodymessage body
bodyHtmlmessage html body
authormessage sender
ticketIdrequest ID
ticketExists1 if this is a mail on an existing request, else 0 (0/1)
sendAutoReply1 if there will be sent an auto reply, else 0 (0/1)
whyNoAutoReplywhy? message
toTrashcan1 if this mail will be sent to trashcan, else 0 (0/1)
toBeDeleted1 if this mail will be deleted, else 0 (0/1)
fromEjournal1 if the mail is from another AIM Server, else 0 (0/1)
isBounce1 if this is a bounce, else 0 (0/1)
mailboxIdThe ID of the mailbox that the mail came in to
smtpIdsmtp message ID
mailBackupraw message text
filterIdID
tomessage to header
frommessage from header
Output values
VariableDescription
subjectmessage subject
authormessage sender
ticketExistsrequest found? (0/1)
sendAutoReplyshould send reply? (0/1)
whyNoAutoReplywhy? message
toTrashcan0/1
toBeDeleted0/1
Examples

The following is an example of a script that will generate a new request if the incoming email is originally supposed to be connected to an existing request. The script will tell the email engine to generate a new request only if the original request is closed.

#setLanguageLevel 3;
Ticket ticket;
ticket.load(getVariable("ticketId").toInteger());

if (ticket.getValue("status") == "2")
  setVariable("ticketExists", "0");  // Generate new request

MainMenu

(113) Runs when the main menu is rendered.

Introduced or updated in version: 9.2 R08

Declaration
Examples
#setLanguageLevel 3;
MainMenu menu = getMainMenu();
menu.addItem("List equipment", getProgram(1) + "&action=listExtraTable&extraTable=y_equipment");

NewNotifyTicketFromForm

(105) Called when a new ticket was created from a form.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
contactIdthe contact ID
personIdthe person ID
formIdthe new Form ID
formDescriptionthe form description
formNamethe form name
formSubmissionIdthe form submission ID
projectIdthe project ID
selectionIdthe selection ID
entryIdthe new ticket ID
ticketIdthe new ticket ID
Additional form specific fields
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("entryId");

NewTicket

(100) Runs when a new ticket is created.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

NewTicketFromCustomerCenter

(101) Called when a new ticket is created and saved from Customer center

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdticket ID
ticketIdticket ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

NewTicketFromCustomerCenterBeforeSave

(103) Called before a new ticket is created and saved from Customer center.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
customerIdperson ID
Output values
VariableDescription
errorMessage
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

NewTicketFromEmail

(102) Runs after ImportMailAfterProcessing (304) if ticket did not exist.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
messageIdmessage ID (int)
entryIdrequest ID
ticketIdrequest ID
customerIdperson ID
customerEmailperson email address
mailBackupbackup string
filterIdfilter ID
toto header value
fromfrom header value
isNewCustomernew customer? (0/1)
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

NewTicketFromForm

(106) Called when a form submission creates a new ticket.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
contactIdthe contact ID
personIdthe person ID
formIdthe new Form ID
formDescriptionthe form description
formNamethe form name
formSubmissionIdthe form submission ID
projectIdthe project ID
selectionIdthe selection ID
entryIdthe new ticket ID
ticketIdthe new ticket ID
categoryIdthe new ticket category ID
titlethe new ticket title
messagethe new ticket body text
Additional form specific fields
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("entryId");

NewTicketFromSpmLink

(104) Called when a mailing link was clicked and mailing specifies link tracking.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
custIdcustomer person ID
personIdcustomer person ID
linkIdlink ID
shipmentIdmailing ID
linkUrlurl
linkHitsnumber of hits
ticketTitleticket title
ticketCategoryticket category ID
ticketPriorityticket priority ID
ticketOwnedByowner of ticket
firstHitfirst click (0/1)
Examples
#setLanguageLevel 3;
String param1 = getVariable("entryId");

SalesAfterSaveAcceptQuote

(1114) Called after saving a quote approval. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 10.0.7

Declaration
Remarks

This trigger is only available as CRMScript trigger.

Input values

VariableDescription
IsNewIs new
Quote.SaleIdQuote.SaleId
Quote.QuoteIdQuote.QuoteId
Quote.ActiveQuoteVersionIdQuote.ActiveQuoteVersionId
Quote.ActiveQuoteAlternativeIdQuote.ActiveQuoteAlternativeId
ActiveUserAssociateId for active user
UserGroupPrimary usergroup of active user
OtherUserGroups.lengthLength of other usergroups for active user
OtherUserGroups[i]List of other usergroup IDs
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String activeQuoteVersion = ed.getInputValue("Quote.ActiveQuoteVersionId");
NSQuoteAgent agent;
NSQuoteVersion version = agent.GetQuoteVersion(activeQuoteVersion.toInteger());
ed.setMessage("Quote was approved with text " + version.GetApprovedText());

SalesAfterSaveAppointment

(1101) Called after an appointment is saved. EventData contains all variables passed by datahandler in the Sales client. It is also possible to create and pass custom variables from BeforeSave event trigger.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AppointmentEntity.ActiveDateActivate date
AppointmentEntity.ActiveLinksHas active links
AppointmentEntity.AppointmentIdAppointment ID
AppointmentEntity.AssignmentStatusAssignment status
AppointmentEntity.Associate.*Associate variables
AppointmentEntity.BookingTypeBooking type
AppointmentEntity.CautionWarningCaution warning
AppointmentEntity.CentralserviceVideomeetIdCentralserviceVideomeetId
AppointmentEntity.CompletedCompleted
AppointmentEntity.CompletedBoolIs completed
AppointmentEntity.Contact.ActiveErpLinksHas active Erp links
AppointmentEntity.Contact.Address.*Contact Address variables
AppointmentEntity.Contact.*Contact variables
AppointmentEntity.CreatedBy.*Associate variables
AppointmentEntity.CreatedDateCreated date
AppointmentEntity.DescriptionDescription
AppointmentEntity.EndDateEnd date
AppointmentEntity.HasAlarmHas alarm
AppointmentEntity.HasConflictHas conflict
AppointmentEntity.InvitationStatusInvitationStatus
AppointmentEntity.InvitedPerson.*Invited person variables
AppointmentEntity.IsAlldayEventIs allday event
AppointmentEntity.IsFreeIs free
AppointmentEntity.IsMileStoneIs milestone
AppointmentEntity.IsPublishedIs published
AppointmentEntity.JoinVideomeetUrlJoinVideomeetUrl
AppointmentEntity.Links.lengthLinks length
AppointmentEntity.LocationLocation
AppointmentEntity.MotherAssociate.*Mother associate variables
AppointmentEntity.MotherIdMotherId
AppointmentEntity.Participants.lengthParticipants length
AppointmentEntity.PreferredTZLocationPreferredTZLocation
AppointmentEntity.PrivateIs private
AppointmentEntity.PublishEventDatePublish event date
AppointmentEntity.PublishFromPublish from
AppointmentEntity.PublishToPublish to
AppointmentEntity.RejectReasonReject reason
AppointmentEntity.StartDateStart date
AppointmentEntity.SuggestedAppointmentIdSuggested AppointmentId
AppointmentEntity.Task.*Task variables
AppointmentEntity.TypeType
AppointmentEntity.UpdatedDateUpdated date
AppointmentEntity.VisibleFor.*VisibleFor variables
DialogCaptionDialog caption
DoSendEmailDoSendEmail
IsNewIs new
IsVideoJoinButtonEnabledIs VideoJoinButton enabled
Links.lengthLinks length
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("AppointmentEntity.AppointmentId");

SalesAfterSaveContact

(1105) Called after a contact is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
ContactEntity.ActiveErpLinksActive Erp links
ContactEntity.ActiveInterestsActive interests
ContactEntity.ActiveStatusMonitorIdActiveStatusMonitorId
ContactEntity.Address.*Address variables
ContactEntity.Associate.*Associate variables
ContactEntity.BounceEmails.lengthBounceEmails length
ContactEntity.Business.*Business variables
ContactEntity.Category.*Category variables
ContactEntity.ContactIdContactId
ContactEntity.Country.*Country variables
ContactEntity.CreatedBy.*Created by variables
ContactEntity.CreatedDateCreated date
ContactEntity.CustomerLanguage.*Customer language variables
ContactEntity.DbiAgentIdDbiAgentId
ContactEntity.DbiKeyDbiKey
ContactEntity.DbiLastModifiedDbiLastModified
ContactEntity.DbiLastSyncronizedDbiLastSyncronized
ContactEntity.DepartmentDepartment
ContactEntity.DescriptionDescription
ContactEntity.Emails.lengthEmails length
ContactEntity.Faxes.lengthFaxes length
ContactEntity.GroupIdGroupId
ContactEntity.Interests.lengthInterests length
ContactEntity.Interests[].List of interests
ContactEntity.KananameKananame
ContactEntity.NameName
ContactEntity.NoMailingNo mailing
ContactEntity.Number1Number 1
ContactEntity.Number2Number 2
ContactEntity.OrgNrOrg nr/VAT no
ContactEntity.Persons.lengthPersons length
ContactEntity.Phones.lengthPhones length
ContactEntity.SupportPerson.*Supportperson variables
ContactEntity.TicketPriority.*Ticket priority variables
ContactEntity.UpdatedDateUpdated date
ContactEntity.Urls.lengthUrls length
ContactEntity.XstopStop
IsNewIs new
PreviousCountryIdPreviousCountryId
Examples
// Get the variables in the current context
EventData ed = getEventData();

String contactId = ed.getInputValue("ContactEntity.ContactId");

// If contact is new and category is "Prospect" create a new Sale opportunity
if(ed.getInputValue("IsNew") == "true" && ed.getInputValue("ContactEntity.Category.Value") == "Prospect"))
{
  NSSaleAgent saleAgent;
  NSContactAgent contactAgent;
  NSContact contact = contactAgent.GetContact(contactId.toInteger());
  NSSaleEntity entity = saleAgent.CreateDefaultSaleEntity();

  entity.SetHeading("New potential sale on " + ed.getInputValue("ContactEntity.Name"));
  entity.SetContact(contact);

  NSSaleType saleType;
  saleType.SetId(1);
  entity.SetSaleType(saleType);

  saleAgent.SaveSaleEntity(entity);
}

SalesAfterSaveDocument

(1104) Called after a document is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
DocumentDateDocument date
DocumentEntity.ActiveLinksActive links
DocumentEntity.Associate.*Associate variables
DocumentEntity.AttentionAttention
DocumentEntity.CompletedCompleted
DocumentEntity.CompletedBooltrue/false
DocumentEntity.Contact.*Contact variables
DocumentEntity.Contact.Address.*Contact address variables
DocumentEntity.CreatedBy.*Created by variables
DocumentEntity.CreatedDateCreated date
DocumentEntity.DateDate
DocumentEntity.DescriptionDescription
DocumentEntity.DocumentIdDocument Id
DocumentEntity.DocumentTemplate.*Document template variables
DocumentEntity.ExternalRefExternal ref
DocumentEntity.HeaderHeader
DocumentEntity.IsPublishedIs published
DocumentEntity.Links.lengthLinks length
DocumentEntity.NameDocument name
DocumentEntity.OurRefOur ref
DocumentEntity.Person.*Person variables
DocumentEntity.Project.*Project variables
DocumentEntity.PublishEventDatePublish event date
DocumentEntity.PublishFromPublish from
DocumentEntity.PublishToPublish to
DocumentEntity.Sale.*Sale variables
DocumentEntity.SnumSnum
DocumentEntity.SuggestedDocumentIdSuggested documentId
DocumentEntity.TypeType
DocumentEntity.UpdatedDateUpdated date
DocumentEntity.UpdatedBy.*Updated by variables
DocumentEntity.VisibleFor.lengthVisible for length
DocumentEntity.VisibleFor[].*List of visible for
DocumentEntity.YourRefYour ref
DocumentNameDocument name
EmailItemIdEmailItemId
IsNewIs new
Links.lengthLinks length
SelectedDocumentTemplateLanguageDocument template language
TemplateListNameTemplate list name
TemplatesExtraInfoExtra info
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("IsNew");
if(param1 == "true" && ed.getInputValue("DocumentEntity.DocumentTemplate.Name") == "Incoming contract")
{
    //Do something when new document of type "Incoming contract" is created
}

SalesAfterSavePerson

(1106) Called after a person is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AssociateAssociate
BusinessBusiness
CategoryCategory
ContactIdContactId
IsNewtrue/false
MailingConsent.HasConsenttrue/false
PersonEntity.ActiveErpLinksActiveErpLinks
PersonEntity.ActiveInterestsActiveInterests
PersonEntity.Address.*Address variables
PersonEntity.BirthDateBirthDate
PersonEntity.BounceEmails.lengthBounce email length
PersonEntity.Business.*Business variables
PersonEntity.Category.*Category variables
PersonEntity.ChatEmails.lengthChat emails length
PersonEntity.Consents.lengthConsents length
PersonEntity.Consents[].*List of consents variables
PersonEntity.Contact.Address.*Contact address variables
PersonEntity.Contact.*Contact variables
PersonEntity.Country.*Country variables
PersonEntity.CreatedBy.*Associate variables
PersonEntity.CreatedDateCreated date
PersonEntity.CustomerLanguage.*Customer language variables
PersonEntity.DbiAgentIdDbiAgentId
PersonEntity.DbiKeyDbiKey
PersonEntity.DbiLastModifiedDbiLastModified
PersonEntity.DbiLastSyncronizedDbiLastSyncronized
PersonEntity.DescriptionDescription
PersonEntity.Emails.lengthEmails length
PersonEntity.Faxes.lengthFaxes length
PersonEntity.Faxes[].*List of faxes
PersonEntity.FirstnameFirst name
PersonEntity.FormalNameFormal name
PersonEntity.FullNameFull name
PersonEntity.Interests.lengthInterests length
PersonEntity.Interests[].*Lists of interest variables
PersonEntity.InternetPhones.lengthInternet phones length
PersonEntity.IsAssociatetrue/false
PersonEntity.KanafnameKanafname
PersonEntity.KanalnameKanalname
PersonEntity.LastnameLastname
PersonEntity.MiddleNameMiddle name
PersonEntity.MobilePhones.lengthMobile phones length
PersonEntity.MobilePhones[].*List of mobile phones variables
PersonEntity.MrmrsMrmrs
PersonEntity.NoMailingtrue/false
PersonEntity.OfficePhones.lengthOffice phones length
PersonEntity.OfficePhones[].*List of office phones variables
PersonEntity.OtherPhones.lengthOther phones length
PersonEntity.OtherPhones[].*List of other phones variables
PersonEntity.PersonIdPersonId
PersonEntity.PersonNumberPerson number
PersonEntity.Position.*Position variables
PersonEntity.Post1Post1
PersonEntity.Post2Post2
PersonEntity.Post3Post3
PersonEntity.PrivatePhones.lengthPrivate phones length
PersonEntity.PrivatePhones[].*List of private phones variables
PersonEntity.Retiredtrue/false
PersonEntity.SalutationSalutation
PersonEntity.ShipmentTypes.lengthShipment types length
PersonEntity.ShipmentTypes[].*List of shipment types variables
PersonEntity.SupportAssociate.*Associate variables
PersonEntity.TicketPriority.*Ticket priority variables
PersonEntity.TitleTitle
PersonEntity.UpdatedDateUpdated date
PersonEntity.Urls.lengthUrls length
PersonEntity.UsePersonAddresstrue/false
PreviousCountryIdPrevious countryId
UseAcademicTitletrue/false
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("PersonEntity.PersonId");

SalesAfterSaveProject

(1109) Called after a project is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
IsNewtrue/false
ProjectEntity.ActiveErpLinksActive Erp links
ProjectEntity.ActiveStatusMonitorIdStatus monitor ID
ProjectEntity.Associate.*Associate variables
ProjectEntity.CompletedCompleted
ProjectEntity.CreatedBy.*Associate variables
ProjectEntity.CreatedDateCreated date
ProjectEntity.DescriptionDescription
ProjectEntity.EndDateEnd date
ProjectEntity.HasImagetrue/false
ProjectEntity.ImageDescriptionImage description
ProjectEntity.IsPublishedtrue/false
ProjectEntity.Links.lengthLinks length
ProjectEntity.NameName
ProjectEntity.NextMilestoneDateNext milestone date
ProjectEntity.NmdAppointmentIdNmdAppointmentId
ProjectEntity.PostitPostit
ProjectEntity.ProjectIdProjectId
ProjectEntity.ProjectMembers.lengthProject members length
ProjectEntity.ProjectNumberProject number
ProjectEntity.ProjectStatus.*Project status variables
ProjectEntity.ProjectType.*Project type variables
ProjectEntity.PublishEventDatePublish event date
ProjectEntity.PublishFromPublish from
ProjectEntity.PublishToPublish to
ProjectEntity.UpdatedDateUpdated date
ProjectEntity.Urls.lengthUrls length
Examples
// Get the variables in the current context
EventData ed = getEventData();

SalesAfterSaveProjectMember

(1011) Called after project member is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddMembersArchiveConfig.ArchiveColumnInfo.lengthArchiveColumn length
AddMembersArchiveConfig.ArchiveEntityInfo.lengthArchiveEntity length
AddMembersArchiveConfig.ArchiveEntityInfo[].*List of archiveEntity with variables
ContactPersonList.lengthLength of person list
ContactPersonList[].*List of persons with variables
CurrentContactIdCurrent ContactId
CurrentContactNameCurrent contact name
CurrentEntityNameCurrent sale name
IsNewIs new
MainEntity.*MainEntity variables
NewMembers§ separated rows, each containing pipe-separated columns: ID, contact ID, contact name, person ID, person name, projectmember role ID
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String[] param1 = ed.getInputValue("NewMembers").split("§");
for(Integer i = 0; i < param1.length(); i++)
{
    //Do something with each new member
}

SalesAfterSaveQuote

(1103) Called after an quote is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddAlternativeCreateOrCopyAddAlternativeCreateOrCopy
AlternativeDiscountAmountAlternativeDiscountPercent
AlternativeDiscountPercentAlternativeDiscountPercent
CanProvideDeliveryTermsListtrue/false
CanProvideDeliveryTypeListtrue/false
CanProvidePaymentTermsListtrue/false
CanProvidePaymentTypeListtrue/false
CannotProvideDeliveryTermsListtrue/false
CannotProvideDeliveryTypeListtrue/false
CannotProvidePaymentTermsListtrue/false
CannotProvidePaymentTypeListtrue/false
DeliveryAddress.LocalizedAddress.lengthLength of list
DeliveryAddress.LocalizedAddress[*].lengthLength of lists
DeliveryAddress.LocalizedAddress[*][].*Delivery address variables
DeliveryAddress.Wgs84LatitudeLatitude
DeliveryAddress.Wgs84LongitudeLongitude
DeliveryAddressShowContacttrue/false
IsNewIs new
NewAlternativeNameNew Alternative name
NotInDrafttrue/false
PaymentAddress.LocalizedAddress.lengthLength of list
PaymentAddress.LocalizedAddress[*].lengthLength of lists
PaymentAddress.LocalizedAddress[*][].*Payment address variables
PaymentAddress.Wgs84LatitudeLatitude
PaymentAddress.Wgs84LongitudeLongitude
PaymentAddressShowContacttrue/false
PreviousDeliveryCountryIdPreviousDeliveryCountryId
PreviousPaymentCountryIdPreviousPaymentCountryId
Quote.AcceptedQuoteAlternativeIdAcceptedQuoteAlternativeId
Quote.ActiveQuoteVersion.*Active QuoteVersion variables
Quote.ActiveQuoteVersionIdActiveQuoteVersionId
Quote.DocumentIdDocumentId
Quote.ERPOrderKeyERPOrderKey
Quote.ERPQuoteKeyERPQuoteKey
Quote.FavoriteQuoteAlternative.*Favorite QuoteAlternative variables
Quote.OrderCommentOrderComment
Quote.PoNumberPoNumber
Quote.PreferredEmailCulturePreferredEmailCulture
Quote.QuoteConnectionIdQuoteConnectionId
Quote.QuoteIdQuoteId
Quote.SaleIdSaleId
QuoteDocumentNameQuote document name
QuoteExtraInfoQuoteExtraInfo
QuoteStateQuoteState
QuoteVersion.*Quoteversion variables
QuoteVersionEarningQuoteVersionEarning
QuoteVersionEarningPercentQuoteVersionEarningPercent
QuoteVersionExtraInfoQuoteVersionExtraInfo
QuoteVersionTotalQuoteVersionTotal
SaleCurrencySaleCurrency
SaleTypeOrderConfirmationTemplateIdSaleTypeOrderConfirmationTemplateId
SelectedCopyAlternativeSelectedCopyAlternative
TitleTitle
UseDiscountOnTotaltrue/false
Additional variables connected to UIFull list can be found using tracing option of trigger
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("Quote.SaleId");

SalesAfterSaveQuoteLine

(1113) Called after an quote line is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
IsNewIs new
MandatoryFieldsMandatory fields
QuoteLine.CodeCode
QuoteLine.DeliveredQuantityDelivered quantity
QuoteLine.DescriptionDescription
QuoteLine.DiscountAmountDiscount amount
QuoteLine.DiscountPercentDiscount percent
QuoteLine.ERPDiscountAmountErp discount amount
QuoteLine.ERPDiscountPercentErp discount percent
QuoteLine.ERPProductKeyErp product key
QuoteLine.EarningAmountEarning amount
QuoteLine.EarningPercentEarning percent
QuoteLine.ExtraField1Extra field
QuoteLine.ExtraField2Extra field
QuoteLine.ExtraField3Extra field
QuoteLine.ExtraField4Extra field
QuoteLine.ExtraField5Extra field
QuoteLine.ExtraInfo.lengthExtra fields length
QuoteLine.IsSubscriptionIs subscription
QuoteLine.ItemNumberItem number
QuoteLine.NameName
QuoteLine.PriceUnitPrice unit
QuoteLine.ProductCategoryKeyProduct category key
QuoteLine.ProductFamilyKeyProduct family key
QuoteLine.ProductTypeKeyProduct type key
QuoteLine.QuantityQuantity
QuoteLine.QuantityUnitQuantityUnit
QuoteLine.QuoteAlternativeIdQuoteAlternativeId
QuoteLine.QuoteLineIdQuoteLineId
QuoteLine.RankRank
QuoteLine.RawExtraInfoRawExtraInfo
QuoteLine.RightsRights
QuoteLine.RuleRule
QuoteLine.StatusStatus
QuoteLine.SubTotalSubtotal
QuoteLine.SubscriptionQuantitySubscription quantity
QuoteLine.SubscriptionStartSubscription start
QuoteLine.SubscriptionUnitSubscription unit
QuoteLine.SupplierSupplier
QuoteLine.SupplierCodeSupplier code
QuoteLine.ThumbnailThumbnail
QuoteLine.TotalPriceTotal price
QuoteLine.UnitCostUnit cost
QuoteLine.UnitListPriceUnit list price
QuoteLine.UnitMinimumPriceUnit minimum price
QuoteLine.UrlUrl
QuoteLine.UserValueOverrideUser value override
QuoteLine.VATVAT
QuoteLine.VATInfoVAT info
QuoteLineExistsQuoteLineExists
StatusTextStatus text
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("QuoteLine.QuoteLineId");

SalesAfterSaveRejectQuote

(1115) Called after saving quote rejection. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 10.0.7

Declaration
Remarks

This trigger is only available as CRMScript trigger.

Input values

VariableDescription
IsNewIs new
Quote.SaleIdQuote.SaleId
Quote.QuoteIdQuote.QuoteId
Quote.ActiveQuoteVersionIdQuote.ActiveQuoteVersionId
Quote.ActiveQuoteAlternativeIdQuote.ActiveQuoteAlternativeId
ActiveUserAssociateId for active user
UserGroupPrimary usergroup of active user
OtherUserGroups.lengthLength of other usergroups for active user
OtherUserGroups[i]List of other usergroup IDs
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String activeQuoteVersion = ed.getInputValue("Quote.ActiveQuoteVersionId");
NSQuoteAgent agent;
NSQuoteVersion version = agent.GetQuoteVersion(activeQuoteVersion.toInteger());
ed.setMessage("Quote was rejected with text " + version.GetApprovedText());

SalesAfterSaveRelation

(1107) Called after a relation is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
ContactRelationEntity.ActiveTextActive text
ContactRelationEntity.CommentComment
ContactRelationEntity.CreatedDateCreated date
ContactRelationEntity.CreatedBy.*Associate variables
ContactRelationEntity.DestinationContactIdDestination contactId
ContactRelationEntity.DestinationContactNameDestination contact name
ContactRelationEntity.DestinationPersonIdDestination personId
ContactRelationEntity.DestinationPersonNameDestination person name
ContactRelationEntity.PassiveTextPassive text
ContactRelationEntity.RelationDefinitionIdRelation definitionId
ContactRelationEntity.RelationIdRelationId
ContactRelationEntity.SourceContactIdSource contactId
ContactRelationEntity.SourceContactNameSource contact name
ContactRelationEntity.SourcePersonIdSource personId
ContactRelationEntity.SourcePersonNameSource person name
ContactRelationEntity.UpdatedDateUpdated date
IsNewtrue/false
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("ContactRelationEntity.RelationId");

SalesAfterSaveSale

(1108)Called after a sale is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
EarningPstEarning percent
IsNewtrue/false
OurCurrencyOur currency
ProbabilityPstProbability percent
SaleEntity.ActiveErpLinksActive Erp links
SaleEntity.ActiveLinksActive links
SaleEntity.AmountAmount
SaleEntity.Associate.*Associate variables
SaleEntity.Competitor.*Competitor variables
SaleEntity.CompletedCompleted
SaleEntity.CompletedBooltrue/false
SaleEntity.Contact.*Contact variables
SaleEntity.CreatedBy.*Associate variables
SaleEntity.CreatedDateCreated date
SaleEntity.Credited.*Credited variables
SaleEntity.Currency.*Currency variables
SaleEntity.EarningEarning
SaleEntity.EarningPercentEarning percent
SaleEntity.HeadingHeading
SaleEntity.IsPublishedtrue/false
SaleEntity.Links.lengthLinks length
SaleEntity.NextDueDateNext duedate
SaleEntity.NumberNumber
SaleEntity.Person.*Person variables
SaleEntity.PostitPostit
SaleEntity.Project.*Project variables
SaleEntity.PublishEventDatePublish event date
SaleEntity.PublishFromPublish from
SaleEntity.PublishToPublish to
SaleEntity.Rating.*Rating variables
SaleEntity.Reason.*Reason variables
SaleEntity.ReasonSold.*Reason sold variables
SaleEntity.SaleIdSaleId
SaleEntity.SaleStakeholders.lengthStakeholders length
SaleEntity.SaleTextSale text
SaleEntity.SaleType.*Saletype variables
SaleEntity.SaledateSale date
SaleEntity.Source.*Source variables
SaleEntity.StatusStatus
SaleEntity.UpdatedDateUpdated date
SaleEntity.VisibleFor.lengthVisiblefor length
SaleEntity.VisibleFor[].*Visiblefor variables
SaleStalledtrue/false
SaleStatusSale status
TotalCostTotal cost
Examples
//If sale status has changed and is sold* Change customer category
if(ed.getInputValue("SaleStatusChanged") == "True" && ed.getInputValue("SaleStatus") == "2")
{
    if(ed.getInputValue("SaleEntity.Contact.CategoryName") == "Prospect")
    {
      NSContactAgent contactAgent;
      NSContactEntity entity = contactAgent.GetContactEntity(ed.getInputValue("SaleEntity.Contact.ContactId").toInteger());

      NSCategory category;
      category.SetId(1);
      entity.SetCategory(category);

      contactAgent.SaveContactEntity(entity);

    }
}

SalesAfterSaveSelection

(1110) Called after selection is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Examples
#setLanguageLevel 3;
EventData ed = getEventData();

SalesAfterSaveSelectionMember

(1112) Called after selection member is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddMembersArchiveConfig.ArchiveColumnInfo.lengthArchiveColumn length
AddMembersArchiveConfig.ArchiveEntityInfo.lengthArchiveEntity length
AddMembersArchiveConfig.ArchiveEntityInfo[].*List of archiveEntity with variables
ContactPersonList.lengthLength of person list
ContactPersonList[].*List of persons with variables
CurrentContactIdCurrent ContactId
CurrentContactNameCurrent contact name
CurrentEntityNameCurrent sale name
IsNewIs new
MainEntity.*MainEntity variables
NewMembers"§" separated rows, each containing pipe-separated columns: ID, contact ID, contact name, person ID, person name, selectionmember role ID
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String[] param1 = ed.getInputValue("NewMembers").split("§");
for(Integer i = 0; i < param1.length(); i++)
{
    //Do something with each new member
}

SalesAfterSaveStakeholder

(1002) Called after a sale stakeholder is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddMembersArchiveConfig.ArchiveColumnInfo.lengthArchiveColumn length
AddMembersArchiveConfig.ArchiveEntityInfo.lengthArchiveEntity length
AddMembersArchiveConfig.ArchiveEntityInfo[].*List of archiveEntity with variables
ContactPersonList.lengthLength of person list
ContactPersonList[].*List of persons with variables
CurrentContactIdCurrent ContactId
CurrentContactNameCurrent contact name
CurrentEntityNameCurrent sale name
IsNewIs new
MainEntity.*MainEntity variables
NewMembers"§" separated rows, each containing pipe-separated columns: ID, contact ID, contact name, person ID, stakeholder role ID
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String[] param1 = ed.getInputValue("NewMembers").split("§");
for(Integer i = 0; i < param1.length(); i++)
{
//Do something with each new member
}

SalesBeforeSaveAcceptQuote

(1014) Called before saving quote approval. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 10.0.7

Declaration
Remarks

This trigger is only available as CRMScript trigger.

Input values

VariableDescription
IsNewIs new
Quote.SaleIdQuote.SaleId
Quote.QuoteIdQuote.QuoteId
Quote.ActiveQuoteVersionIdQuote.ActiveQuoteVersionId
Quote.ActiveQuoteAlternativeIdQuote.ActiveQuoteAlternativeId
ActiveUserAssociateId for active user
UserGroupPrimary usergroup of active user
OtherUserGroups.lengthLength of other usergroups for active user
OtherUserGroups[i]List of other usergroup IDs
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String message = "";
String activeQuoteAlternative = ed.getInputValue("Quote.ActiveQuoteAlternativeId");
String userGroup = ed.getInputValue("UserGroup");
Float discountPercent;
NSQuoteAgent agent;
NSQuoteAlternative alternative = agent.GetQuoteAlternative(activeQuoteAlternative.toInteger());
discountPercent = alternative.GetDiscountPercent();
//Check if discount higher than limit and specific usergroup 
if(discountPercent.round() >= 40 && userGroup == "2"){
	message = "Discount is to high you are not allowed to approve it " + discountPercent.toString(2);
	ed.setBlockExecution(true);
	ed.setMessage(message);
}

SalesBeforeSaveAppointment

(1001) Called before an appointment is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AppointmentEntity.ActiveDateActivate date
AppointmentEntity.ActiveLinksHas active links
AppointmentEntity.AppointmentIdAppointment ID
AppointmentEntity.AssignmentStatusAssignment status
AppointmentEntity.Associate.*Associate variables
AppointmentEntity.BookingTypeBooking type
AppointmentEntity.CautionWarningCaution warning
AppointmentEntity.CentralserviceVideomeetIdCentralserviceVideomeetId
AppointmentEntity.CompletedCompleted
AppointmentEntity.CompletedBoolIs completed
AppointmentEntity.Contact.ActiveErpLinksHas active Erp links
AppointmentEntity.Contact.Address.*Contact Address variables
AppointmentEntity.Contact.*Contact variables
AppointmentEntity.CreatedBy.*Associate variables
AppointmentEntity.CreatedDateCreated date
AppointmentEntity.DescriptionDescription
AppointmentEntity.EndDateEnd date
AppointmentEntity.HasAlarmHas alarm
AppointmentEntity.HasConflictHas conflict
AppointmentEntity.InvitationStatusInvitationStatus
AppointmentEntity.InvitedPerson.*Invited person variables
AppointmentEntity.IsAlldayEventIs allday event
AppointmentEntity.IsFreeIs free
AppointmentEntity.IsMileStoneIs milestone
AppointmentEntity.IsPublishedIs published
AppointmentEntity.JoinVideomeetUrlJoinVideomeetUrl
AppointmentEntity.Links.lengthLinks length
AppointmentEntity.LocationLocation
AppointmentEntity.MotherAssociate.*Mother associate variables
AppointmentEntity.MotherIdMotherId
AppointmentEntity.Participants.lengthParticipants length
AppointmentEntity.PreferredTZLocationPreferredTZLocation
AppointmentEntity.PrivateIs private
AppointmentEntity.PublishEventDatePublish event date
AppointmentEntity.PublishFromPublish from
AppointmentEntity.PublishToPublish to
AppointmentEntity.RejectReasonReject reason
AppointmentEntity.StartDateStart date
AppointmentEntity.SuggestedAppointmentIdSuggested AppointmentId
AppointmentEntity.Task.*Task variables
AppointmentEntity.TypeType
AppointmentEntity.UpdatedDateUpdated date
AppointmentEntity.VisibleFor.*VisibleFor variables
DialogCaptionDialog caption
DoSendEmailDoSendEmail
IsNewIs new
IsVideoJoinButtonEnabledIs VideoJoinButton enabled
Links.lengthLinks length
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("AppointmentEntity.AppointmentId");

SalesBeforeSaveContact

(1005) Called before a contact is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
ContactEntity.ActiveErpLinksActive Erp links
ContactEntity.ActiveInterestsActive interests
ContactEntity.ActiveStatusMonitorIdActiveStatusMonitorId
ContactEntity.Address.*Address variables
ContactEntity.Associate.*Associate variables
ContactEntity.BounceEmails.lengthBounceEmails length
ContactEntity.Business.*Business variables
ContactEntity.Category.*Category variables
ContactEntity.ContactIdContactId
ContactEntity.Country.*Country variables
ContactEntity.CreatedBy.*Created by variables
ContactEntity.CreatedDateCreated date
ContactEntity.CustomerLanguage.*Customer language variables
ContactEntity.DbiAgentIdDbiAgentId
ContactEntity.DbiKeyDbiKey
ContactEntity.DbiLastModifiedDbiLastModified
ContactEntity.DbiLastSyncronizedDbiLastSyncronized
ContactEntity.DepartmentDepartment
ContactEntity.DescriptionDescription
ContactEntity.Emails.lengthEmails length
ContactEntity.Faxes.lengthFaxes length
ContactEntity.GroupIdGroupId
ContactEntity.Interests.lengthInterests length
ContactEntity.Interests[].List of interests
ContactEntity.KananameKananame
ContactEntity.NameName
ContactEntity.NoMailingNo mailing
ContactEntity.Number1Number 1
ContactEntity.Number2Number 2
ContactEntity.OrgNrOrg nr/VAT no
ContactEntity.Persons.lengthPersons length
ContactEntity.Phones.lengthPhones length
ContactEntity.SupportPerson.*Supportperson variables
ContactEntity.TicketPriority.*Ticket priority variables
ContactEntity.UpdatedDateUpdated date
ContactEntity.Urls.lengthUrls length
ContactEntity.XstopStop
IsNewIs new
PreviousCountryIdPreviousCountryId
Examples
// Get the variables in the current context
EventData ed = getEventData();

// Get the input value from the current company
String orgNr = ed.getInputValue("ContactEntity.OrgNr");
Bool blockExecution = false;

// If the orgNr field is empty, block save with a message
if(orgNr.isEmpty())
{
  ed.setMessage("Please type in a Org.Nr");
  blockExecution = true;
}// If the orgNr field has letters or is not 9 digits
else if(!orgNr.isDigit() || orgNr.getLength() != 9)
{
  ed.setMessage("Please type in a valid Org.Nr (9 digits)");
  blockExecution = true;
}
ed.setBlockExecution(blockExecution);

SalesBeforeSaveDocument

(1004) Called before an document is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
DocumentDateDocument date
DocumentEntity.ActiveLinksActive links
DocumentEntity.Associate.*Associate variables
DocumentEntity.AttentionAttention
DocumentEntity.CompletedCompleted
DocumentEntity.CompletedBooltrue/false
DocumentEntity.Contact.*Contact variables
DocumentEntity.Contact.Address.*Contact address variables
DocumentEntity.CreatedBy.*Created by variables
DocumentEntity.CreatedDateCreated date
DocumentEntity.DateDate
DocumentEntity.DescriptionDescription
DocumentEntity.DocumentIdDocument Id
DocumentEntity.DocumentTemplate.*Document template variables
DocumentEntity.ExternalRefExternal ref
DocumentEntity.HeaderHeader
DocumentEntity.IsPublishedIs published
DocumentEntity.Links.lengthLinks length
DocumentEntity.NameDocument name
DocumentEntity.OurRefOur ref
DocumentEntity.Person.*Person variables
DocumentEntity.Project.*Project variables
DocumentEntity.PublishEventDatePublish event date
DocumentEntity.PublishFromPublish from
DocumentEntity.PublishToPublish to
DocumentEntity.Sale.*Sale variables
DocumentEntity.SnumSnum
DocumentEntity.SuggestedDocumentIdSuggested documentId
DocumentEntity.TypeType
DocumentEntity.UpdatedDateUpdated date
DocumentEntity.UpdatedBy.*Updated by variables
DocumentEntity.VisibleFor.lengthVisible for length
DocumentEntity.VisibleFor[].*List of visible for
DocumentEntity.YourRefYour ref
DocumentNameDocument name
EmailItemIdEmailItemId
IsNewIs new
Links.lengthLinks length
SelectedDocumentTemplateLanguageDocument template language
TemplateListNameTemplate list name
TemplatesExtraInfoExtra info
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("IsNew");

SalesBeforeSavePerson

(1006) Called before a person is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AssociateAssociate
BusinessBusiness
CategoryCategory
ContactIdContactId
IsNewtrue/false
MailingConsent.HasConsenttrue/false
PersonEntity.ActiveErpLinksActiveErpLinks
PersonEntity.ActiveInterestsActiveInterests
PersonEntity.Address.*Address variables
PersonEntity.BirthDateBirthDate
PersonEntity.BounceEmails.lengthBounce email length
PersonEntity.Business.*Business variables
PersonEntity.Category.*Category variables
PersonEntity.ChatEmails.lengthChat emails length
PersonEntity.Consents.lengthConsents length
PersonEntity.Consents[].*List of consents variables
PersonEntity.Contact.Address.*Contact address variables
PersonEntity.Contact.*Contact variables
PersonEntity.Country.*Country variables
PersonEntity.CreatedBy.*Associate variables
PersonEntity.CreatedDateCreated date
PersonEntity.CustomerLanguage.*Customer language variables
PersonEntity.DbiAgentIdDbiAgentId
PersonEntity.DbiKeyDbiKey
PersonEntity.DbiLastModifiedDbiLastModified
PersonEntity.DbiLastSyncronizedDbiLastSyncronized
PersonEntity.DescriptionDescription
PersonEntity.Emails.lengthEmails length
PersonEntity.Faxes.lengthFaxes length
PersonEntity.Faxes[].*List of faxes
PersonEntity.FirstnameFirst name
PersonEntity.FormalNameFormal name
PersonEntity.FullNameFull name
PersonEntity.Interests.lengthInterests length
PersonEntity.Interests[].*Lists of interest variables
PersonEntity.InternetPhones.lengthInternet phones length
PersonEntity.IsAssociatetrue/false
PersonEntity.KanafnameKanafname
PersonEntity.KanalnameKanalname
PersonEntity.LastnameLastname
PersonEntity.MiddleNameMiddle name
PersonEntity.MobilePhones.lengthMobile phones length
PersonEntity.MobilePhones[].*List of mobile phones variables
PersonEntity.MrmrsMrmrs
PersonEntity.NoMailingtrue/false
PersonEntity.OfficePhones.lengthOffice phones length
PersonEntity.OfficePhones[].*List of office phones variables
PersonEntity.OtherPhones.lengthOther phones length
PersonEntity.OtherPhones[].*List of other phones variables
PersonEntity.PersonIdPersonId
PersonEntity.PersonNumberPerson number
PersonEntity.Position.*Position variables
PersonEntity.Post1Post1
PersonEntity.Post2Post2
PersonEntity.Post3Post3
PersonEntity.PrivatePhones.lengthPrivate phones length
PersonEntity.PrivatePhones[].*List of private phones variables
PersonEntity.Retiredtrue/false
PersonEntity.SalutationSalutation
PersonEntity.ShipmentTypes.lengthShipment types length
PersonEntity.ShipmentTypes[].*List of shipment types variables
PersonEntity.SupportAssociate.*Associate variables
PersonEntity.TicketPriority.*Ticket priority variables
PersonEntity.TitleTitle
PersonEntity.UpdatedDateUpdated date
PersonEntity.Urls.lengthUrls length
PersonEntity.UsePersonAddresstrue/false
PreviousCountryIdPrevious countryId
UseAcademicTitletrue/false
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("PersonEntity.PersonId");

SalesBeforeSaveProject

(1009) Called before a project is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
IsNewtrue/false
ProjectEntity.ActiveErpLinksActive Erp links
ProjectEntity.ActiveStatusMonitorIdStatus monitor ID
ProjectEntity.Associate.*Associate variables
ProjectEntity.CompletedCompleted
ProjectEntity.CreatedBy.*Associate variables
ProjectEntity.CreatedDateCreated date
ProjectEntity.DescriptionDescription
ProjectEntity.EndDateEnd date
ProjectEntity.HasImagetrue/false
ProjectEntity.ImageDescriptionImage description
ProjectEntity.IsPublishedtrue/false
ProjectEntity.Links.lengthLinks length
ProjectEntity.NameName
ProjectEntity.NextMilestoneDateNext milestone date
ProjectEntity.NmdAppointmentIdNmdAppointmentId
ProjectEntity.PostitPostit
ProjectEntity.ProjectIdProjectId
ProjectEntity.ProjectMembers.lengthProject members length
ProjectEntity.ProjectNumberProject number
ProjectEntity.ProjectStatus.*Project status variables
ProjectEntity.ProjectType.*Project type variables
ProjectEntity.PublishEventDatePublish event date
ProjectEntity.PublishFromPublish from
ProjectEntity.PublishToPublish to
ProjectEntity.UpdatedDateUpdated date
ProjectEntity.Urls.lengthUrls length
Examples
// Get the variables in the current context
EventData ed = getEventData();

if(ed.getInputValue("IsNew") == "true")
{
    //If project is new make sure Description is not empty
    Bool blockExecution = false;
    String description = ed.getInputValue("ProjectEntity.Description");

    // If the length of description field is less than 2 chars, block save with a message
    if(description.getLength() <= 2)
    {
      ed.setMessage("Please type in a description");
      blockExecution = true;
    }
    ed.setBlockExecution(blockExecution);
}

SalesBeforeSaveProjectMember

(1011) Called before project member is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddMembersArchiveConfig.ArchiveColumnInfo.lengthArchiveColumn length
AddMembersArchiveConfig.ArchiveEntityInfo.lengthArchiveEntity length
AddMembersArchiveConfig.ArchiveEntityInfo[].*List of archiveEntity with variables
ContactPersonList.lengthLength of person list
ContactPersonList[].*List of persons with variables
CurrentContactIdCurrent ContactId
CurrentContactNameCurrent contact name
CurrentEntityNameCurrent sale name
IsNewIs new
MainEntity.*MainEntity variables
NewMembers§ separated rows, each containing pipe-separated columns: ID, contact ID, contact name, person ID, person name, projectmember role ID
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String[] param1 = ed.getInputValue("NewMembers").split("§");
for(Integer i = 0; i < param1.length(); i++)
{
    //Do something with each new member
}

SalesBeforeSaveQuote

(1003) Called before an quote is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddAlternativeCreateOrCopyAddAlternativeCreateOrCopy
AlternativeDiscountAmountAlternativeDiscountPercent
AlternativeDiscountPercentAlternativeDiscountPercent
CanProvideDeliveryTermsListtrue/false
CanProvideDeliveryTypeListtrue/false
CanProvidePaymentTermsListtrue/false
CanProvidePaymentTypeListtrue/false
CannotProvideDeliveryTermsListtrue/false
CannotProvideDeliveryTypeListtrue/false
CannotProvidePaymentTermsListtrue/false
CannotProvidePaymentTypeListtrue/false
DeliveryAddress.LocalizedAddress.lengthLength of list
DeliveryAddress.LocalizedAddress[*].lengthLength of lists
DeliveryAddress.LocalizedAddress[*][].*Delivery address variables
DeliveryAddress.Wgs84LatitudeLatitude
DeliveryAddress.Wgs84LongitudeLongitude
DeliveryAddressShowContacttrue/false
IsNewIs new
NewAlternativeNameNew Alternative name
NotInDrafttrue/false
PaymentAddress.LocalizedAddress.lengthLength of list
PaymentAddress.LocalizedAddress[*].lengthLength of lists
PaymentAddress.LocalizedAddress[*][].*Payment address variables
PaymentAddress.Wgs84LatitudeLatitude
PaymentAddress.Wgs84LongitudeLongitude
PaymentAddressShowContacttrue/false
PreviousDeliveryCountryIdPreviousDeliveryCountryId
PreviousPaymentCountryIdPreviousPaymentCountryId
Quote.AcceptedQuoteAlternativeIdAcceptedQuoteAlternativeId
Quote.ActiveQuoteVersion.*Active QuoteVersion variables
Quote.ActiveQuoteVersionIdActiveQuoteVersionId
Quote.DocumentIdDocumentId
Quote.ERPOrderKeyERPOrderKey
Quote.ERPQuoteKeyERPQuoteKey
Quote.FavoriteQuoteAlternative.*Favorite QuoteAlternative variables
Quote.OrderCommentOrderComment
Quote.PoNumberPoNumber
Quote.PreferredEmailCulturePreferredEmailCulture
Quote.QuoteConnectionIdQuoteConnectionId
Quote.QuoteIdQuoteId
Quote.SaleIdSaleId
QuoteDocumentNameQuote document name
QuoteExtraInfoQuoteExtraInfo
QuoteStateQuoteState
QuoteVersion.*Quoteversion variables
QuoteVersionEarningQuoteVersionEarning
QuoteVersionEarningPercentQuoteVersionEarningPercent
QuoteVersionExtraInfoQuoteVersionExtraInfo
QuoteVersionTotalQuoteVersionTotal
SaleCurrencySaleCurrency
SaleTypeOrderConfirmationTemplateIdSaleTypeOrderConfirmationTemplateId
SelectedCopyAlternativeSelectedCopyAlternative
TitleTitle
UseDiscountOnTotaltrue/false
Additional variables connected to UIFull list can be found using tracing option of trigger
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("Quote.SaleId");

SalesBeforeSaveQuoteLine

(1013) Called before an quote line is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
IsNewIs new
MandatoryFieldsMandatory fields
QuoteLine.CodeCode
QuoteLine.DeliveredQuantityDelivered quantity
QuoteLine.DescriptionDescription
QuoteLine.DiscountAmountDiscount amount
QuoteLine.DiscountPercentDiscount percent
QuoteLine.ERPDiscountAmountErp discount amount
QuoteLine.ERPDiscountPercentErp discount percent
QuoteLine.ERPProductKeyErp product key
QuoteLine.EarningAmountEarning amount
QuoteLine.EarningPercentEarning percent
QuoteLine.ExtraField1Extra field
QuoteLine.ExtraField2Extra field
QuoteLine.ExtraField3Extra field
QuoteLine.ExtraField4Extra field
QuoteLine.ExtraField5Extra field
QuoteLine.ExtraInfo.lengthExtra fields length
QuoteLine.IsSubscriptionIs subscription
QuoteLine.ItemNumberItem number
QuoteLine.NameName
QuoteLine.PriceUnitPrice unit
QuoteLine.ProductCategoryKeyProduct category key
QuoteLine.ProductFamilyKeyProduct family key
QuoteLine.ProductTypeKeyProduct type key
QuoteLine.QuantityQuantity
QuoteLine.QuantityUnitQuantityUnit
QuoteLine.QuoteAlternativeIdQuoteAlternativeId
QuoteLine.QuoteLineIdQuoteLineId
QuoteLine.RankRank
QuoteLine.RawExtraInfoRawExtraInfo
QuoteLine.RightsRights
QuoteLine.RuleRule
QuoteLine.StatusStatus
QuoteLine.SubTotalSubtotal
QuoteLine.SubscriptionQuantitySubscription quantity
QuoteLine.SubscriptionStartSubscription start
QuoteLine.SubscriptionUnitSubscription unit
QuoteLine.SupplierSupplier
QuoteLine.SupplierCodeSupplier code
QuoteLine.ThumbnailThumbnail
QuoteLine.TotalPriceTotal price
QuoteLine.UnitCostUnit cost
QuoteLine.UnitListPriceUnit list price
QuoteLine.UnitMinimumPriceUnit minimum price
QuoteLine.UrlUrl
QuoteLine.UserValueOverrideUser value override
QuoteLine.VATVAT
QuoteLine.VATInfoVAT info
QuoteLineExistsQuoteLineExists
StatusTextStatus text
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("QuoteLine.QuoteLineId");

SalesBeforeSaveRejectQuote

(1015) Called before saving quote rejection. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 10.0.7

Declaration
Remarks

This trigger is only available as CRMScript trigger.

Input values

VariableDescription
IsNewIs new
Quote.SaleIdQuote.SaleId
Quote.QuoteIdQuote.QuoteId
Quote.ActiveQuoteVersionIdQuote.ActiveQuoteVersionId
Quote.ActiveQuoteAlternativeIdQuote.ActiveQuoteAlternativeId
ActiveUserAssociateId for active user
UserGroupPrimary usergroup of active user
OtherUserGroups.lengthLength of other usergroups for active user
OtherUserGroups[i]List of other usergroup IDs
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String activeQuoteVersion = ed.getInputValue("Quote.ActiveQuoteVersionId");

SalesBeforeSaveRelation

(1007) Called before a relation is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
ContactRelationEntity.ActiveTextActive text
ContactRelationEntity.CommentComment
ContactRelationEntity.CreatedDateCreated date
ContactRelationEntity.CreatedBy.*Associate variables
ContactRelationEntity.DestinationContactIdDestination contactId
ContactRelationEntity.DestinationContactNameDestination contact name
ContactRelationEntity.DestinationPersonIdDestination personId
ContactRelationEntity.DestinationPersonNameDestination person name
ContactRelationEntity.PassiveTextPassive text
ContactRelationEntity.RelationDefinitionIdRelation definitionId
ContactRelationEntity.RelationIdRelationId
ContactRelationEntity.SourceContactIdSource contactId
ContactRelationEntity.SourceContactNameSource contact name
ContactRelationEntity.SourcePersonIdSource personId
ContactRelationEntity.SourcePersonNameSource person name
ContactRelationEntity.UpdatedDateUpdated date
IsNewtrue/false
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String param1 = ed.getInputValue("ContactRelationEntity.RelationId");

SalesBeforeSaveSale

(1008) Called before a sale is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
EarningPstEarning percent
IsNewtrue/false
OurCurrencyOur currency
ProbabilityPstProbability percent
SaleEntity.ActiveErpLinksActive Erp links
SaleEntity.ActiveLinksActive links
SaleEntity.AmountAmount
SaleEntity.Associate.*Associate variables
SaleEntity.Competitor.*Competitor variables
SaleEntity.CompletedCompleted
SaleEntity.CompletedBooltrue/false
SaleEntity.Contact.*Contact variables
SaleEntity.CreatedBy.*Associate variables
SaleEntity.CreatedDateCreated date
SaleEntity.Credited.*Credited variables
SaleEntity.Currency.*Currency variables
SaleEntity.EarningEarning
SaleEntity.EarningPercentEarning percent
SaleEntity.HeadingHeading
SaleEntity.IsPublishedtrue/false
SaleEntity.Links.lengthLinks length
SaleEntity.NextDueDateNext duedate
SaleEntity.NumberNumber
SaleEntity.Person.*Person variables
SaleEntity.PostitPostit
SaleEntity.Project.*Project variables
SaleEntity.PublishEventDatePublish event date
SaleEntity.PublishFromPublish from
SaleEntity.PublishToPublish to
SaleEntity.Rating.*Rating variables
SaleEntity.Reason.*Reason variables
SaleEntity.ReasonSold.*Reason sold variables
SaleEntity.SaleIdSaleId
SaleEntity.SaleStakeholders.lengthStakeholders length
SaleEntity.SaleTextSale text
SaleEntity.SaleType.*Saletype variables
SaleEntity.SaledateSale date
SaleEntity.Source.*Source variables
SaleEntity.StatusStatus
SaleEntity.UpdatedDateUpdated date
SaleEntity.VisibleFor.lengthVisiblefor length
SaleEntity.VisibleFor[].*Visiblefor variables
SaleStalledtrue/false
SaleStatusSale status
TotalCostTotal cost
Examples
// Get the variables in the current context
EventData ed = getEventData();

SalesBeforeSaveSelection

(1010) Called before selection is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Examples
#setLanguageLevel 3;
EventData ed = getEventData();

SalesBeforeSaveSelectionMember

(1012) Called before selection member is saved. EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddMembersArchiveConfig.ArchiveColumnInfo.lengthArchiveColumn length
AddMembersArchiveConfig.ArchiveEntityInfo.lengthArchiveEntity length
AddMembersArchiveConfig.ArchiveEntityInfo[].*List of archiveEntity with variables
ContactPersonList.lengthLength of person list
ContactPersonList[].*List of persons with variables
CurrentContactIdCurrent ContactId
CurrentContactNameCurrent contact name
CurrentEntityNameCurrent sale name
IsNewIs new
MainEntity.*MainEntity variables
NewMembers"§" separated rows, each containing pipe-separated columns: ID, contact ID, contact name, person ID, person name, selectionmember role ID
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String[] param1 = ed.getInputValue("NewMembers").split("§");
for(Integer i = 0; i < param1.length(); i++)
{
    //Do something with each new member
}

SalesBeforeSaveStakeholder

(1002) Called before a sale stakeholder is saved.EventData contains all variables passed by datahandler in the Sales client.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
AddMembersArchiveConfig.ArchiveColumnInfo.lengthArchiveColumn length
AddMembersArchiveConfig.ArchiveEntityInfo.lengthArchiveEntity length
AddMembersArchiveConfig.ArchiveEntityInfo[].*List of archiveEntity with variables
ContactPersonList.lengthLength of person list
ContactPersonList[].*List of persons with variables
CurrentContactIdCurrent ContactId
CurrentContactNameCurrent contact name
CurrentEntityNameCurrent sale name
IsNewIs new
MainEntity.*MainEntity variables
NewMembers"§" separated rows, each containing pipe-separated columns: ID, contact ID, contact name, person ID, stakeholder role ID
Examples
#setLanguageLevel 3;
EventData ed = getEventData();
String[] param1 = ed.getInputValue("NewMembers").split("§");
for(Integer i = 0; i < param1.length(); i++)
{
    //Do something with each new member
}

ScheduledTaskFailed

(300) Runs after scheduled task failed

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdscheduled task ID
retriesschedule number of retries
disabledschedule disabled ?
errorMessageerror message string
nextExecutionnext scheduled start (datetime)
executionTimeint
scriptIdscript ID to execute
scriptNamename of script
scriptIncludeIdunique ID of script
Examples
#setLanguageLevel 3;
String param1 = getVariable("entryId");

ServiceScreenAddMessageAfterSubmit

(703) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenAddMessageBeforeSubmit

(603) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenAddMessageLoad

(503) Called when screen is constructed, useful for setting default values into HTML elements

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditCompanyAfterSubmit

(708) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditCompanyBeforeSubmit

(608) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditCompanyLoad

(508) Runs for HtmlPage.lang_ticket_newCompany screen. Called when screen is constructed, useful for setting default values into HTML elements

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditCustomerAfterSubmit

(706) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditCustomerBeforeSubmit

(606) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditCustomerLoad

(506) Runs for HtmlPage.lang_ticket_editCustomer

Called when screen is constructed, useful for setting default values into HTML elements

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

ServiceScreenEditExtraTableAfterSubmit

(710) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditExtraTableBeforeSubmit

(610) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditExtraTableLoad

(510) Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

ServiceScreenEditTicketAfterSubmit

(704) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditTicketBeforeSubmit

(604) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenEditTicketLoad

(504) Called when screen is constructed, useful for setting default values into HTML elements

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenForwardAfterSubmit

(709) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenForwardBeforeSubmit

(609) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenForwardLoad

(509) Runs for HtmlPage.forward event. Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenListTicketMessagesAfterSubmit

(702) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenListTicketMessagesBeforeSubmit

(602) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenListTicketMessagesLoad

(502) Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenNewQuickTicketAfterSubmit

(701) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenNewQuickTicketBeforeSubmit

(601) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenNewQuickTicketLoad

(501) Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenNewTicketAfterSubmit

(700) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenNewTicketBeforeSubmit

(600) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenNewTicketLoad

(500) Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenViewCompanyAfterSubmit

(707) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenViewCompanyBeforeSubmit

(607) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenViewCompanyLoad

(507) Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenViewCustomerAfterSubmit

(705) Called after screen is submitted and values are saved, useful for performing after processing.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenViewCustomerBeforeSubmit

(605) Called before screen is submitted and values are saved, useful for validations with blocking of save.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

ServiceScreenViewCustomerLoad

(505) Called when screen is constructed, useful for setting default values into HTML elements.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
buttonHtmlSubmitButton element value
x.valueelement x value
x.displayValueelement x display value

All HTML elements in the screen are added to the input values.

Examples
#setLanguageLevel 3;
String param1 = getVariable("button");

TicketActivated

(113) Runs when ticket is saved and status changed from postponed to active.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
ticketStatus.oldold value (enum TicketBaseStatus)
ticketStatus.newnew value (enum TicketBaseStatus)
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketChangedCategory

(141) Runs when a ticket is saved and the ticket category changes ID.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
category.oldold value
category.newnew value
Examples
#setLanguageLevel 3;
String param1 = getVariable("personId");

TicketChangedOwnedBy

(142) Runs when a ticket is saved and the owner changed.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
owned_by.oldold value
owned_by.newnew value
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketChangedPrimaryCustomer

(143) Runs when a ticket is saved and the customer ID changes.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
cust_id.oldold value
cust_id.newnew value
Examples
#setLanguageLevel 3;
String param1 = getVariable("personId");

TicketChangedPriority

(140) Runs when a ticket is saved and priority changed.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
priority.oldold value
priority.newnew value
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketChangedSlevel

(145) Runs when a ticket is saved and the security level changed.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
slevel.oldold value
slevel.newnew value
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketChangedTicketStatus

(144) Runs when a ticket is saved and status changed. If user-defined statuses are present in solution available values will differ from below.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
ticketStatus.oldold value (enum TicketBaseStatus)
ticketStatus.newnew value (enum TicketBaseStatus)
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketClosed

(110) Runs when a ticket is saved and the status changes to closed.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
ticketStatus.oldold value (enum TicketBaseStatus)
ticketStatus.newnew value (enum TicketBaseStatus)
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

TicketDeleted

(112) Runs when a ticket is saved and the status changes to deleted.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
ticketStatus.oldold value (enum TicketBaseStatus)
ticketStatus.newnew value (enum TicketBaseStatus)
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

TicketExternalMessageAdded

(152) Called for all external messages added to a ticket, following a call to the TicketMessageAdded trigger.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdthe ticket ID
ticketIdthe ticket ID
messageIdthe ticket message ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("entryId");

TicketInternalMessageAdded

(151) Called for all internal messages added to a ticket, following a call to the TicketMessageAdded trigger.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdthe ticket ID
ticketIdthe ticket ID
messageIdthe ticket message ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("entryId");

TicketMessageAdded

(150) Called for all messages added to a ticket, followed by call to either TicketInternalMessageAdded or TicketExternalMessageAdded trigger.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdthe ticket ID
ticketIdthe ticket ID
messageIdthe ticket message ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("entryId");

TicketMessageSentimentCalculated

(153) Runs when a new sentiment is calculated.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
languageTwo letter language code
sentiment
sentimentConfidence
messageIdmessage ID
messageIsExternalBool
messageIsFirstBool
ticketTitletitle for request
ticketPriorityIdpriority ID
ticketPriorityNamepriority name
ticketCategoryIdcategory ID
ticketCategoryNamecategory name
ticketStatusIdstatus ID
ticketStatusNamestatus name
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketPostponed

(111) Runs when a ticket is saved and the status changed to postponed.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
ticketStatus.oldold value (enum TicketBaseStatus)
ticketStatus.newnew value (enum TicketBaseStatus)
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

TicketReopened

(120) Runs when a ticket is saved and the status changed from closed to active.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdrequest ID
ticketIdrequest ID
personIdcustomer (person) ID
contactIdcompany (contact) ID
ticketStatus.oldold value (enum TicketBaseStatus)
ticketStatus.newnew value (enum TicketBaseStatus)
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

TicketReopenedFromCustomerCenter

(121) Called when a ticket is reopened from Customer center.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
entryIdticket ID
ticketIdticket ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");

TicketReopenedFromEmail

(122) Runs after ImportMailAfterProcessing (304) if ticket existed before.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
messageIdmessage ID (int)
entryIdrequest ID
ticketIdrequest ID
customerIdperson ID
customerEmailperson email address
mailBackupbackup string
filterIdfilter ID
toto header value
fromfrom header value
isNewCustomernew customer? (0/1)
Examples
#setLanguageLevel 3;
String param1 = getVariable("customerId");

TicketSave

Called when a ticket is being saved.

Introduced or updated in version: 9.2 R08

Declaration
Remarks

Input values

VariableDescription
ticketIdticket ID
activeUserejUser ID
Examples
#setLanguageLevel 3;
String param1 = getVariable("ticketId");
Example parser variables:

if(getParserVariable("ticket.new.category") != getParserVariable("ticket.old.value"))
    log("Category has changed");
In this event it is possible to get more information regarding changes done using Parser variables to compare old values against new values.
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top