Hello all,
I’m trying to add an account name field to a module. I want this to have a search option which several fields do have. Looking around the module builder and studio option under admin i’m not seeing this as an option. It doesn’t appear to be on the field type lists that you can select when creating different fields. Any help with this would be great. Thanks!
-Jeff
Do you want to be able to search by account on the list view of your module? If so all you need to do is edit the search layout for your module in studio.
Or do you mean when you create or edit a record in your module you want a relationship field (which lets you type in account names and select them to relate your module to an account)? If you want this functionality you need to add a one to many relationship between accounts and your module (again you can do this in studio).
1 Like
Thank you, changing the relationships i believe is what i was looking for.
My relationship seemed to be set up properly. I’m going to try to explain better. When trying to create a new field i would like it to have select option, some examples that are in other modules would be Account name: with a “select account” next to it which allows you to search. Another would be Assigned to: with a “select user” arrow that you can click to search your users. I haven’t seen in studio or in the admin menu how to create this. Any help would be much appreciated!
if you have a one to many relationship it should add the select arrow to the form automatically. If you look at the users module in studio you will see there are one to many relationships between it and most other modules, as that’s how the assigned to fields work.
It’s important which side owns the relationship. So if you want an account field to show in your module you must go to accounts in studio and create the relationship there, not in your module.
1 Like
Ok, thank you that has got me on the right track! Now that i have the field with the search option i wanted is there anyway to move this in layouts? Or do any editing to the name? Thanks again!
If you go to your module in studio the field should display in the detail and edit views and you should be able to move it to wherever you want. Similarly if you go to labels for your module you should see a label you can edit to change the name.
You can also edit things like this by adding files to custom/Extension/modules/yourmodulename/Ext/Vardefs and custom/Extension/modules/yourmodulename/Ext/Language then doing a repair and build, but it’s much easier to just use studio where possible.
1 Like