NoMailing in before / after Company trigger EventData?

Hi guys, am i blind, or is "NoMailing" not included in the eventData object in the Before / after saving a company trigger?

 

Have been looking for quite some time, i have no problems in the After saving company trigger, as i can just get the contact entity, and find it that way around, but the story is different when using the before save trigger.

 

Specifically, i'm making a function that removes emarketing consent if no mailing has been set on the contact. and a message needs to be shown if no mailing is removed again, telling that new emarketing consents needs to be set on each person.

 

In order to make the last part, i'm gonna need a way to get the state of the checkbox before saving to compare with what it is currently.

So i guess this is missing due to it being forgotten or maybe just low priority, as the field is pretty much obsolete after the consent functionality was added?

 

Thanks :)

RE: NoMailing in before / after Company trigger EventData?

Hi,

If I trace before save Company I see this;

If I trace after save Company I see this;

 

So for me it looks like it is present?

By: Michel Krohn-Dale 10 Jun 2021

RE: NoMailing in before / after Company trigger EventData?

That's strange, i just checked again, this is the full dump of inputValues that is available for me - as you can see, ContactEntity.NoMailing is not present:

ContactEntity.ActiveErpLinks
ContactEntity.ActiveInterests
ContactEntity.ActiveStatusMonitorId
ContactEntity.Address.Formatted
ContactEntity.Address.LocalizedAddress.length
ContactEntity.Address.LocalizedAddress[0].length
ContactEntity.Address.LocalizedAddress[0][0].AddressType
ContactEntity.Address.LocalizedAddress[0][0].Label
ContactEntity.Address.LocalizedAddress[0][0].Name
ContactEntity.Address.LocalizedAddress[0][0].Tooltip
ContactEntity.Address.LocalizedAddress[0][0].Value
ContactEntity.Address.LocalizedAddress[0][0].ValueLength
ContactEntity.Address.LocalizedAddress[1].length
ContactEntity.Address.LocalizedAddress[1][0].AddressType
ContactEntity.Address.LocalizedAddress[1][0].Label
ContactEntity.Address.LocalizedAddress[1][0].Name
ContactEntity.Address.LocalizedAddress[1][0].Tooltip
ContactEntity.Address.LocalizedAddress[1][0].Value
ContactEntity.Address.LocalizedAddress[1][0].ValueLength
ContactEntity.Address.LocalizedAddress[2].length
ContactEntity.Address.LocalizedAddress[2][0].AddressType
ContactEntity.Address.LocalizedAddress[2][0].Label
ContactEntity.Address.LocalizedAddress[2][0].Name
ContactEntity.Address.LocalizedAddress[2][0].Tooltip
ContactEntity.Address.LocalizedAddress[2][0].Value
ContactEntity.Address.LocalizedAddress[2][0].ValueLength
ContactEntity.Address.LocalizedAddress[2][1].AddressType
ContactEntity.Address.LocalizedAddress[2][1].Label
ContactEntity.Address.LocalizedAddress[2][1].Name
ContactEntity.Address.LocalizedAddress[2][1].Tooltip
ContactEntity.Address.LocalizedAddress[2][1].Value
ContactEntity.Address.LocalizedAddress[2][1].ValueLength
ContactEntity.Address.LocalizedAddress[3].length
ContactEntity.Address.LocalizedAddress[3][0].AddressType
ContactEntity.Address.LocalizedAddress[3][0].Label
ContactEntity.Address.LocalizedAddress[3][0].Name
ContactEntity.Address.LocalizedAddress[3][0].Tooltip
ContactEntity.Address.LocalizedAddress[3][0].Value
ContactEntity.Address.LocalizedAddress[3][0].ValueLength
ContactEntity.Address.LocalizedAddress[4].length
ContactEntity.Address.LocalizedAddress[4][0].AddressType
ContactEntity.Address.LocalizedAddress[4][0].Label
ContactEntity.Address.LocalizedAddress[4][0].Name
ContactEntity.Address.LocalizedAddress[4][0].Tooltip
ContactEntity.Address.LocalizedAddress[4][0].Value
ContactEntity.Address.LocalizedAddress[4][0].ValueLength
ContactEntity.Address.LocalizedAddress[5].length
ContactEntity.Address.LocalizedAddress[5][0].AddressType
ContactEntity.Address.LocalizedAddress[5][0].Label
ContactEntity.Address.LocalizedAddress[5][0].Name
ContactEntity.Address.LocalizedAddress[5][0].Tooltip
ContactEntity.Address.LocalizedAddress[5][0].Value
ContactEntity.Address.LocalizedAddress[5][0].ValueLength
ContactEntity.Address.LocalizedAddress[5][1].AddressType
ContactEntity.Address.LocalizedAddress[5][1].Label
ContactEntity.Address.LocalizedAddress[5][1].Name
ContactEntity.Address.LocalizedAddress[5][1].Tooltip
ContactEntity.Address.LocalizedAddress[5][1].Value
ContactEntity.Address.LocalizedAddress[5][1].ValueLength
ContactEntity.Address.Wgs84Latitude
ContactEntity.Address.Wgs84Longitude
ContactEntity.Associate.AssociateId
ContactEntity.Associate.Deleted
ContactEntity.Associate.EjUserId
ContactEntity.Associate.FormalName
ContactEntity.Associate.FullName
ContactEntity.Associate.GroupIdx
ContactEntity.Associate.Name
ContactEntity.Associate.PersonId
ContactEntity.Associate.Tooltip
ContactEntity.Associate.Type
ContactEntity.BounceEmails.length
ContactEntity.Business.Id
ContactEntity.Business.Tooltip
ContactEntity.Business.Value
ContactEntity.Category.Id
ContactEntity.Category.Tooltip
ContactEntity.Category.Value
ContactEntity.ContactId
ContactEntity.Country.AddressLayoutId
ContactEntity.Country.CountryId
ContactEntity.Country.CurrencyId
ContactEntity.Country.Deleted
ContactEntity.Country.DialInPrefix
ContactEntity.Country.DomainName
ContactEntity.Country.DomesticAddressLayoutId
ContactEntity.Country.EnglishName
ContactEntity.Country.ForeignAddressLayoutId
ContactEntity.Country.InterAreaPrefix
ContactEntity.Country.Name
ContactEntity.Country.OrgNrText
ContactEntity.Country.ThreeLetterISOCountry
ContactEntity.Country.Tooltip
ContactEntity.Country.TwoLetterISOCountry
ContactEntity.Country.ZipPrefix
ContactEntity.CreatedBy.AssociateId
ContactEntity.CreatedBy.Deleted
ContactEntity.CreatedBy.EjUserId
ContactEntity.CreatedBy.FormalName
ContactEntity.CreatedBy.FullName
ContactEntity.CreatedBy.GroupIdx
ContactEntity.CreatedBy.Name
ContactEntity.CreatedBy.PersonId
ContactEntity.CreatedBy.Tooltip
ContactEntity.CreatedBy.Type
ContactEntity.CreatedDate
ContactEntity.CustomFields.Map:Lat
ContactEntity.CustomFields.Map:Lat:org
ContactEntity.CustomFields.Map:Lng
ContactEntity.CustomFields.Map:Lng:org
ContactEntity.CustomFields.Map:Status
ContactEntity.CustomFields.Map:Status:DisplayText
ContactEntity.CustomFields.Map:Status:DisplayTooltip
ContactEntity.CustomFields.Map:Status:org
ContactEntity.CustomFields.SuperOffice:1
ContactEntity.CustomFields.SuperOffice:1:DisplayText
ContactEntity.CustomFields.SuperOffice:1:DisplayTooltip
ContactEntity.CustomFields.SuperOffice:1:org
ContactEntity.CustomFields.SuperOffice:2
ContactEntity.CustomFields.SuperOffice:2:DisplayText
ContactEntity.CustomFields.SuperOffice:2:DisplayTooltip
ContactEntity.CustomFields.SuperOffice:2:org
ContactEntity.CustomFields.SuperOffice:3
ContactEntity.CustomFields.SuperOffice:3:org
ContactEntity.CustomFields.SuperOffice:4
ContactEntity.CustomFields.SuperOffice:4:DisplayText
ContactEntity.CustomFields.SuperOffice:4:DisplayTooltip
ContactEntity.CustomFields.SuperOffice:4:org
ContactEntity.CustomFields.SuperOffice:5
ContactEntity.CustomFields.SuperOffice:5:DisplayText
ContactEntity.CustomFields.SuperOffice:5:DisplayTooltip
ContactEntity.CustomFields.SuperOffice:5:org
ContactEntity.CustomFields.SuperOffice:6
ContactEntity.CustomFields.SuperOffice:6:org
ContactEntity.CustomFields.SuperOffice:9
ContactEntity.CustomFields.SuperOffice:9:DisplayText
ContactEntity.CustomFields.SuperOffice:9:org
ContactEntity.CustomFields.x_quote_access_key

 

I thought the value was maybe hidden, so i tried fetching it in the code, and it was filled - so you're right, it's there - but why is it not listed in the trace overview of the eventdata variable?

 

 ¯\_(ツ)_/¯

By: Dennis Mortensgaard 10 Jun 2021