Is it possible to make the 'Subject' field in the History sub panel in accounts a drop down list? If so how do i do it and how can I set the value list?
Sugar 5.5
Thanks
Is it possible to make the 'Subject' field in the History sub panel in accounts a drop down list? If so how do i do it and how can I set the value list?
Sugar 5.5
Thanks
Hi anicolais,
The subpanels simply display data already entered in other modules. A dropdown specifies the type of input on the edit view. Also, history merges data from multiple different modules (Notes, Emails, Tasks, Meetings, Calls, etc).
What are you trying to accomplish?
You can set the notes subject field (or other fields) to a dropdown in Notes Edit View using a vardefs extension. Then the value selected in the dropdown will appear as text in the subpanel.
Explain what you want to do, then we can give more detaiils how to do it.
Phil
Basically I am trying to make a content management system. Long story short the only way the user can create records in notes is through the history sub panel in the accounts module. Each note or document that the user uploads to the system through the sub panel falls into a certain category. This is where the subject field comes in. I want this field to only allow the user to enter certain values into it such as Twitter, Facebook, RFP, etc. I want this to be shown in this sub panel and in the summary view still so i thought making the subject field a dropdown would be the easiest way?
So if I follow correctly, your user will click the Create Note or Attachment button and on the form that gets displayed you want the Subject field to be a dropdown.
If this is the case, then you are no longer in the subpanel, but in the Notes Edit View since you're specifically creating a Note now. You can also create a note by going to the Activities tab and clicking Create Note from the Shortcuts menu, which gets you to the same place.
So all you need to do is customize the Notes name field to be an enum and create the dropdown for it.
Go to Admin and open Dropdown Editor.
Create a dropdown like notes_subject_list, enter the values you want in the list and save it
Now change Notes name field to be type enum:
Create a new file under <sugarroot>/custom/Extension/Notes/Ext/Vardefs. It can have any name e.g. name_enum.php
You can create the folders if they do not exist.
Add the following contents:
Save the file and do a Quick Repair and Rebuild and it will make the changes.PHP Code:<?php
$dictionary['Note']['fields']['name']['type'] = 'enum';
$dictionary['Note']['fields']['name']['options'] = 'notes_subject_list';
?>
I think that's it, but I did not try it myself. I have not changed the name field before, so you may have issues like keeping this as a link in the subpanel... not sure. But try it and see. If you have problems, you can back it out by deleting the file from that folder and doing another repair.
Phil
Thats awesome works great!!! Thanks!!!
Last edited by anicolais; 2010-02-26 at 02:26 PM.
Hi
I tried this approach to make the Call Subject a dropdown box, but it didn't work.
Can you help?
I created the file "\sugarceTEST\custom\modules\Calls\Ext\Vardefs\sub ject_enum.php" with the following code:
<?php // created: 2010-09-09 11:02:00
$dictionary['Call']['fields']['name']['default']='Angariacao';
$dictionary['Call']['fields']['name']['type'] = 'enum';
$dictionary['Call']['fields']['name']['options'] = 'calls_subject_list';
?>
Rebuilt and it the subject still appears as text field.
Thanks
Worked like a charm.
Many thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks