Skip to main content
Solved

Updating Event Custom Lookup Field using the Rules Dispatcher

  • July 31, 2026
  • 2 replies
  • 4 views

askey-s
Sidekick (Customer)
Forum|alt.badge.img+6

I have a rules_dispatcher activity that updates a custom field in an event where the field is a string value.

        activities = {
                        {
                            "update_event_ejb",
                                eventId = [[ PARENT_EVENT_ID ]],
                                customFields =     [[
                                                    {
                                                        { customFieldShortCode = "APPLICATIONSLIST",
                                                            stringValue = "" .. ARRAY_STRING
                                                        },
                                                    }
                                                ]],
                        },
         },
 

I also have a field that is a single-select Contact User lookup that also needs to be set, and I have the short code of the Contact User record to be used.  However, I don’t know what the format for the update_event_ejb activity should be.  I’ve tried various connotations of lookup {} options but with no success.

Would someone be able to shed some light on it, please?

Many thanks, Steven

Best answer by Paul McCulloch

I haven’t tried this, but I’d expect to use something like:
 

CONTACT_USER_ID = ASSYSTEJB:lookup_id("ContactUser", CONTACT_USER_SHORTCODE)

activities = {
    {
        "update_event_ejb",
        eventId = [[ PARENT_EVENT_ID ]],
        customFields = [[
            {
                { customFieldShortCode = "APPLICATIONSLIST",
                    stringValue = "" .. ARRAY_STRING
                },
                { customFieldShortCode = "YOUR_CONTACT_FIELD_SHORTCODE",
                    systemLookupTypeName = "ContactUser",
                    systemLookupValueId = CONTACT_USER_ID
                },
            }
        ]],
    },
},
 

2 replies

Forum|alt.badge.img+11
  • Hero (Employee)
  • Answer
  • July 31, 2026

I haven’t tried this, but I’d expect to use something like:
 

CONTACT_USER_ID = ASSYSTEJB:lookup_id("ContactUser", CONTACT_USER_SHORTCODE)

activities = {
    {
        "update_event_ejb",
        eventId = [[ PARENT_EVENT_ID ]],
        customFields = [[
            {
                { customFieldShortCode = "APPLICATIONSLIST",
                    stringValue = "" .. ARRAY_STRING
                },
                { customFieldShortCode = "YOUR_CONTACT_FIELD_SHORTCODE",
                    systemLookupTypeName = "ContactUser",
                    systemLookupValueId = CONTACT_USER_ID
                },
            }
        ]],
    },
},
 


askey-s
Sidekick (Customer)
Forum|alt.badge.img+6
  • Author
  • Sidekick (Customer)
  • July 31, 2026

Hi Paul

Thank you for this.  Apart from having to change the systemLookupTypeName value to be "com.axiossystems.assyst.dto.userConfiguration.ContactUserDto" it works just as I need.

Not that it matters, but the error message with the original value was:
Failed to update event id 6181597 via assyst EJB api. Exception: NullPointerException: An exception has been raised by the application. Cannot invoke "com.axiossystems.assyst.dto.customisation.custom.web.WebCustomPropertyValueDto.getParentWebCustomPropertyDefinitionId()" because "webCustomPropertyValue" is null. Status code: 500

Steven