Hello,
Please note that I tried to trigger a function on lookup change using the below code:
{
request: "crt.HandleViewModelAttributeChangeRequest",
handler: async (request, next) => {
// listen for changes to the EmployeesNumber field
if (request.attributeName === "EmployeesNumber" && !request.silent) {
console.log("EmployeesNumber changed", request.oldValue, request.value);
}
return next?.handle(request);
}
}
and I changed "EmployeesNumber" field by "UsrTicketStatus"
you can find attached image below:<br /> <img alt="" data-entity-type="file" data-entity-uuid="e29bb553-d205-4a9f-b729-c90862b674e0" src="/sites/community.com/files/inline-images/Screenshot%202024-01-09%20140020.png" />
What is the issue here ?
Thank you
-Georges
Like
Hello Georges,
Are you sure that the attribute name "EmployeesNumber" is correct (and it doesn't have a name like "StringAttribute_ljc6yh6")? Do you stop at
console.log("EmployeesNumber changed", request.oldValue, request.value);
if you set a breakpoint in code at this row? The issue is that you don't receive a console message?