API Questions on Kentico API.
Version 6.x > API > SubscribeToObjects Not Firing for Custom Fields View modes: 
User avatar
Member
Member
JA - 8/6/2013 8:37:59 PM
   
SubscribeToObjects Not Firing for Custom Fields
I've created a connector that subscribes to the user via the following code.

SubscribeToObjects(TaskProcessTypeEnum.AsyncSimple, PredefinedObjectType.USER, TaskTypeEnum.CreateObject);
SubscribeToObjects(TaskProcessTypeEnum.AsyncSimple, PredefinedObjectType.USER, TaskTypeEnum.UpdateObject);

SubscribeToObjects(TaskProcessTypeEnum.AsyncSimple, "cms.usersettings", TaskTypeEnum.CreateObject);
SubscribeToObjects(TaskProcessTypeEnum.AsyncSimple, "cms.usersettings", TaskTypeEnum.UpdateObject);


The connector seems to only fire when fields like FirstName, LastName or Email are editted. If editting custom user setting fields it doesn't seem to fire? Any ideas why? Kentico does log an information event with source of User and event code UPDATEOBJ but the connector doesn't get called. All events should reach the ProcessInternalTaskAsync method in the connector as per the standard user changes which currently do.

User avatar
Member
Member
JA - 8/6/2013 8:50:52 PM
   
RE:SubscribeToObjects Not Firing for Custom Fields
Ended up getting rid of the cms.usersettings subscriptions and changed the user ones to TaskProcessTypeEnum.AsyncSnapshot which include child objects etc. This may trigger more often then what I want but it works.

User avatar
Member
Member
kentico_sandroj - 8/6/2013 9:35:45 PM
   
RE:SubscribeToObjects Not Firing for Custom Fields
Thanks for sharing the solution - I will check with the developers if there is a better approach but this seems to be the standard. I will report back if there is another method.

Regards,
Sandro