{"id":9324,"date":"2014-12-29T17:11:40","date_gmt":"2014-12-29T17:11:40","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=9324"},"modified":"2014-12-29T17:11:40","modified_gmt":"2014-12-29T17:11:40","slug":"import-bulk-options-into-selection-field-in-sage-crm","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/","title":{"rendered":"Import Bulk options into Selection Field in Sage CRM"},"content":{"rendered":"<p>It is possible to add options to the selection field of Sage CRM by doing Field Level customization. But if one wants to add several options into the selection field, then it will become a cumbersome task to do. This task can be automated by doing little customizations in Sage CRM. In this blog post, we will be explaining the same with an example.<br \/>\n<span style=\"color: rgb(153, 51, 0);\"><strong>Tip:<\/strong> Please make sure that the Sage CRM database is properly backed up before performing below tasks.<\/span><br \/>\n<span style=\"color: #993300;\"><strong><em>New Stuff:\u00a0<\/em><\/strong><a title=\"Control Selection Lookup in Sage CRM\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/control-selection-lookup-in-sage-crm\/\" target=\"_blank\">Control Selection Lookup in Sage CRM<\/a><\/span><br \/>\nConsider a case where a user wants to add several cities into the <strong>Country field<\/strong> dropdown from table <strong>Country Codes<\/strong> of another database. You need to follow below steps for the same.<br \/>\n1) Create JavaScript executable file and add below code snippet into the file.<br \/>\nvar CRMUserName = &#8216;Admin&#8217;;<br \/>\nvar CRMPassword = &#8221;;<br \/>\nvar CRMInstance = \u201cCRM\u201d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/Change this as per Sage CRM Instance Name<br \/>\nvar eWare = CRM= new ActiveXObject(&#8220;eWare.&#8221;+ CRMInstance);<br \/>\neWare.FastLogon = 3;\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/this prevents the Metadata from loading.<br \/>\neWare.Logon(CRMUserName, CRMPassword);<br \/>\nvar CountrySQLQuery = &#8221; select * from CountryCodes (nolock) &#8220;;<br \/>\nvar objCountrySQLQuery = CRM.CreateQueryObj(CountrySQLQuery,&#8221;&#8221;);<br \/>\nobjCountrySQLQuery.SelectSQL();<br \/>\nif(!objCountrySQLQuery.eof)<br \/>\n{<br \/>\nwhile (!objCountrySQLQuery.eof)<br \/>\n{<br \/>\nobjCustomCaption = CRM.CreateRecord(&#8220;custom_captions&#8221;);<br \/>\nobjCustomCaption.Capt_FamilyType = \u201cChoices\u201d;<br \/>\nobjCustomCaption.Capt_Family = \u201caddr_country\u201d;<br \/>\nobjCustomCaption.Capt_Code = objCountrySQLQuery.FieldValue(&#8220;countrycodeid\u201d);<br \/>\nobjCustomCaption.Capt_US = objCountrySQLQuery.FieldValue(&#8220;countryname\u201d);<br \/>\nobjCustomCaption.SaveChanges();<br \/>\nobjCountrySQLQuery.NextRecord();<br \/>\n}<br \/>\n}<br \/>\nobjCountrySQLQuery = \u201c\u201d;<br \/>\nobjCountrySQLQuery = null;<br \/>\nHere, Countrycodeid is the primary key on CountryCodes table and Countryname is the name of the country.<br \/>\n2) Once done, execute the executable file (Refer below blog post for executing the file).<br \/>\n<a title=\"Run the External JavaScript file in 64-bit Operating system\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/03\/20\/run-the-external-javascript-file-in-64-bit-operating-system\/\" target=\"_blank\">Run the External JavaScript file in 64-bit Operating system<br \/>\n<\/a>3) Once the script is executed, login into Sage CRM and do Metadata Refresh.<br \/>\nNow you can check the Country dropdown field. You will observe that all the Countries are listed in the dropdown.<br \/>\n<a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-9325\" src=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg\" alt=\"Selection1\" width=\"186\" height=\"302\" \/><br \/>\n<\/a>You can apply above trick to any other dropdown field by modifying the above script.<br \/>\nYou can also import bulk data in Sage CRM entity with above script. However, this will require corresponding modifications in the code.<br \/>\n<strong><em><span style=\"color: rgb(153, 51, 0);\">Also Read:<\/span><br \/>\n<\/em><\/strong>1) <a title=\"Linked selection fields through client side scripting\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/09\/11\/linked-selection-fields-through-client-side-scripting\/\" target=\"_blank\">Linked selection fields through client side scripting<br \/>\n<\/a>2) <a title=\"Allowing multi selection search on a single select field\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/08\/22\/allowing-multi-selection-search-on-a-single-select-field\/\" target=\"_blank\">Allowing multi selection search on a single select field<br \/>\n<\/a>3) <a title=\"Change Search Select Advanced field to Selection in Self Service\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2012\/07\/13\/change-search-select-advanced-field-to-selection-in-self-service\/\" target=\"_blank\">Change Search Select Advanced field to Selection in Self Service<br \/>\n<\/a>4) <a title=\"User Select field Selection or Finder?\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2011\/12\/03\/user-select-field-selection-or-finder\/\" target=\"_blank\">User Select field Selection or Finder?<br \/>\n<\/a>5) <a title=\"Sorting Country Selection\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2011\/04\/16\/sorting-country-selection\/\" target=\"_blank\">Sorting Country Selection<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to add options to the selection field of Sage CRM by doing Field Level customization. But if one wants to add several options into the selection field, then it will become a cumbersome task to do. This task can be automated by doing little customizations in Sage CRM. In this blog post,\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,83,127,184,270,332,336,337,342,357],"tags":[628,833,1016,1393,1718,2010,2030,2031,2033,2259],"class_list":["post-9324","post","type-post","status-publish","format-standard","hentry","category-bulk","category-crm72","category-dropdown","category-import-sage-crm","category-options","category-sage-crm","category-sage-crm-7-1-sp2","category-sage-crm-7-2","category-sage-crm7-3","category-selection","tag-bulk","tag-crm7-0","tag-dropdown","tag-import","tag-options","tag-sage-crm","tag-sage-crm-7-0","tag-sage-crm-7-1","tag-sage-crm-7-2","tag-selection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Import Bulk options into Selection Field in Sage CRM - Sage CRM \u2013 Tips, Tricks and Components<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Import Bulk options into Selection Field in Sage CRM - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"It is possible to add options to the selection field of Sage CRM by doing Field Level customization. But if one wants to add several options into the selection field, then it will become a cumbersome task to do. This task can be automated by doing little customizations in Sage CRM. In this blog post,\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-29T17:11:40+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg\" \/>\n<meta name=\"author\" content=\"greysagecrm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"greysagecrm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/\",\"name\":\"Import Bulk options into Selection Field in Sage CRM - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg\",\"datePublished\":\"2014-12-29T17:11:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#primaryimage\",\"url\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg\",\"contentUrl\":\"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Import Bulk options into Selection Field in Sage CRM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\",\"name\":\"Sage CRM \u2013 Tips, Tricks and Components\",\"description\":\"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\",\"name\":\"greysagecrm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"greysagecrm\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Import Bulk options into Selection Field in Sage CRM - Sage CRM \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/","og_locale":"en_US","og_type":"article","og_title":"Import Bulk options into Selection Field in Sage CRM - Sage CRM \u2013 Tips, Tricks and Components","og_description":"It is possible to add options to the selection field of Sage CRM by doing Field Level customization. But if one wants to add several options into the selection field, then it will become a cumbersome task to do. This task can be automated by doing little customizations in Sage CRM. In this blog post,\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2014-12-29T17:11:40+00:00","og_image":[{"url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg","type":"","width":"","height":""}],"author":"greysagecrm","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagecrm","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/","name":"Import Bulk options into Selection Field in Sage CRM - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#primaryimage"},"thumbnailUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg","datePublished":"2014-12-29T17:11:40+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#primaryimage","url":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg","contentUrl":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-content\/uploads\/2014\/12\/Selection1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/12\/29\/import-bulk-options-into-selection-field-in-sage-crm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"Import Bulk options into Selection Field in Sage CRM"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/","name":"Sage CRM \u2013 Tips, Tricks and Components","description":"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f","name":"greysagecrm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"greysagecrm"},"url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/9324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/comments?post=9324"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/9324\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=9324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=9324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=9324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}