Posted on 14/03/2026 13:49:58
Hi Adrian,
I poked around in the code and found this:
foreach (CustomFieldValue customFieldValue in this)
{
string requestName = string.Format(CultureInfo.InvariantCulture, "CustomField.{0}_{1}", customFieldValue.CustomField.TableName,
customFieldValue.CustomField.SystemName);
This means you need to include the table name also (AccessUser for users and AccessUserAddress for addresses). So your field name (the ID doesn't matter) should be like this:
<input type="text" name="CustomField.AccessUser_AccessUser_AppActivationId" value="1" />
where CustomField. is a hardcoded prefix. the first AccessUser_ comes from the table name and separator and the rest is the system name of the field.
That said, it doesn't seem to work for the Create template. When I added this code to the Edit template I can make it work, but when added to the Create template it does nothing.
I think that's a bug in the code. In UserEditFrontend.SetUserDetailsFromRequest I see this:
//Request custom fields
user.CustomFieldValues.RequestCustomFieldValues();
but I don't see that being called anywhere for Create scenarios. I believe it's a bug so you may want to report this to care.
You can work around it and do it yourself with a simple notification subscriber:
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Security.UserManagement.Notifications;
namespace Dynamicweb.Host.Suite;
/// <summary>
/// Assigns custom fields from the request to the user. Only runs for new users.
/// </summary>
[Subscribe(Security.UserManagement.Notifications.Notifications.UserSaved)]
public class UserSavedSubscriber : NotificationSubscriber
{
/// <summary>
/// Update the user's fields.
/// </summary>
/// <param name="notification">The notification.</param>
/// <param name="args">The arguments.</param>
public override void OnNotify(string notification, NotificationArgs args)
{
var userArgs = (UserSavedNotificationArgs)args;
if (!userArgs.IsNew)
{
return;
}
userArgs.Subject.CustomFieldValues.RequestCustomFieldValues();
}
}
Even if this gets implemented in the core version in the future, your custom code shouldn't break anything.
Hope this helps,
Imar