function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maverick123Maverick123 

Clone the Role and Profile fields

Hi All,

 

I need help with creating a custom link on user, which would copy over the existing user record's profile and role in a new page, where i would fill the rest of the details and save it to create a new user.

 

I tried using this link : /{!User.Id}/e?clone=1&retURL=%2F{!User.Id}&isdtp=mn

 

But this copies all the fields, whereas i need just the profile and role to copied over.

 

Please let me know.

 

Thanks

MohandaasMohandaas

Using clone will copy values of all the field. Try passing values to those two fields using the field Id. You may have to use a web developer add-on tool to obtain the field id from the form.

 

Eg: First name field will have a id something like this 'name_firstlea2'.

 

Append this in your link "/?name_firstlea2={!user.FirstName}". The first name field in the new page will take this value.

Maverick123Maverick123

Thanks Cloud Nine...

 

It works this way only for the static fields like FirstName, LastName, alias etc...., but not for the picklist fields like Profile and Role.

 

Any help on this is very much appreciated....

 

Thanks