Update the business_logic.js file as follows:
- Locate the following code:
var result = new Array();
if (addr != "" && addr != null) {
var curr_user_id = helpers.get_current_user_id(session);
var filter = session.create_criteria("and");
filter.add(session.create_expression("ContactEmail", "like", addr));
filter.add(session.create_expression("SiebelShared", "eq", true));
- Replace this code with the following:
var result = new Array();
if (addr != "" && addr != null) {
var curr_user_id = od_helpers.get_current_user_id(session);
var filter = session.create_criteria("and"); filter.add(session.create_expression("ContactEmail", "like", addr));
filter.add(session.create_expression("SiebelShared", "eq", true));
- Locate the following code:
helpers.for_each(session.find_items("User", filter), function(item) {
result.push(item.id)
});
if (result.length == 0 && account_addresses != null && include.helpers.contains(account_addresses, addr)) result.push(include.helpers.get_current_user_id(session));
}
return result;
}
- Replace this code with the following:
helpers.for_each(session.find_items("User", filter), function(item) {
result.push(item.id)
});
if (result.length == 0 && account_addresses != null && include.helpers.contains(account_addresses, addr)) result.push(include.od_helpers.get_current_user_id(session));
}
return result;
}
- Locate the following code:
var result = new Array();
if (addr != "" && addr != null) {
var curr_user_id = helpers.get_current_user_id(session);
var filter = session.create_criteria("and");
filter.add(session.create_expression("LeadEmail", "like", addr)); helpers.for_each(session.find_items("Lead", filter), function(item) {
result.push(item.id)
});
- Replace this code with the following:
var result = new Array();
if (addr != "" && addr != null) {
var curr_user_id = od_helpers.get_current_user_id(session);
var filter = session.create_criteria("and");
filter.add(session.create_expression("LeadEmail", "like", addr));
helpers.for_each(session.find_items("Lead", filter), function(item) {
result.push(item.id)
});
- Locate the following code:
var mode = od_helpers.get_ownership_mode(ctx, action_ctx.type);
if (mode == "mixed" || mode == "owner") {
var curr_user_id = helpers.get_current_user_id(ctx.session),
with_user_id = action_ctx.with_id;
var is_manual_operation = action_ctx.params == null || action_ctx.params.is_manual_operation;
// prevent manual set primary to non-current user
- Replace this code with the following:
var mode = od_helpers.get_ownership_mode(ctx, action_ctx.type);
if (mode == "mixed" || mode == "owner") {
var curr_user_id = od_helpers.get_current_user_id(ctx.session),
with_user_id = action_ctx.with_id;
var is_manual_operation = action_ctx.params == null || action_ctx.params.is_manual_operation;
// prevent manual set primary to non-current user
- Locate the following code:
var item_ex = ctx.item_ex;
var default_type_id = item_ex ? item_ex.get_type() : null;
type_id = type_id || default_type_id;
var current_user_id = helpers.get_current_user_id(ctx.session);
if (current_user_id != null && type_id && item_ex) {
var ownership_mode = od_helpers.get_ownership_mode(ctx, type_id);
- Replace this code with the following:
var item_ex = ctx.item_ex;
var default_type_id = item_ex ? item_ex.get_type() : null;
type_id = type_id || default_type_id;
var current_user_id = od_helpers.get_current_user_id(ctx.session);
if (current_user_id != null && type_id && item_ex) {
var ownership_mode = od_helpers.get_ownership_mode(ctx, type_id);
- Locate the following code:
function prefill_owner_od(ctx) {
var current_user_id = helpers.get_current_user_id(ctx.session);
return current_user_id;
}
- Replace this code with the following:
function prefill_owner_od(ctx){
var current_user_id = od_helpers.get_current_user_id(ctx.session);
return current_user_id;
}
- Locate the following code:
}
if (!book_id) {
var defaults = helpers.get_defaults(ctx.session),
user_default_book_name = defaults != null ? defaults.DefaultBookName : "",
user_default_book = ctx.session.find_item("Book", od_helpers.create_expression_or_null_value_filter(ctx.session,"Label", "eq", user_default_book_name));
book_id = user_default_book != null ? user_default_book.Value : book_id;
- Replace this code with the following:
}
if (!book_id) {
var defaults = od_helpers.get_defaults(ctx.session),
user_default_book_name = defaults != null ? defaults.DefaultBookName :"",
user_default_book = ctx.session.find_item("Book", od_helpers.create_expression_or_null_value_filter(ctx.session, "Label", "eq", user_default_book_name));
book_id = user_default_book != null ? user_default_book.Value :book_id;
- Locate the following code:
var fill_owner = ownership_mode != "book" && !(ownership_mode == "mixed" && prefill_book(ctx, item_ex)); // prefill owner in mixed mode if no book was prefilled
if (fill_owner) {
current_user_id = helpers.get_current_user_id(ctx.session);
}
return current_user_id;
}
- Replace this code with the following:
var fill_owner = ownership_mode != "book" && !(ownership_mode == "mixed" && prefill_book(ctx, item_ex)); // prefill owner in mixed mode if no book was prefilled
if (fill_owner) {
current_user_id = od_helpers.get_current_user_id(ctx.session);
}
return current_user_id;
}
- Locate the following code:
function get_default_currency_code_od(ctx) {
var defaults = helpers.get_defaults(ctx.session);
var currency_code = null;
if ((defaults != null) && (defaults["CurrencyCode"] != null)) {
- Replace this code with the following:
function get_default_currency_code_od(ctx){
var defaults = od_helpers.get_defaults(ctx.session);
var currency_code = null;
if ((defaults != null) && (defaults["CurrencyCode"] != null)) {
- Locate the following code:
{
var sales_process_id = null,
filter = ctx.session.create_criteria("and"),
defaults = helpers.get_defaults(ctx.session);
if ((defaults != null) && (defaults["SalesProcessId"] != "")){
// default sales process which is set for the user's role
- Replace this code with the following:
{
var sales_process_id = null,
filter = ctx.session.create_criteria("and"),
defaults = od_helpers.get_defaults(ctx.session);
if ((defaults != null) && (defaults["SalesProcessId"] != "")){
// default sales process which is set for the user's role
- Locate the following code:
{
var LanguageCode;
var access_profile = ctx.session.res_string("lang_default_access_profile");
var defaults = helpers.get_defaults(ctx.session);
if ((defaults != null) && (defaults["LanguageCode"] != null)){
// user LanguageCode
- Replace this code with the following:
{
var LanguageCode;
var access_profile = ctx.session.res_string("lang_default_access_profile");
var defaults = od_helpers.get_defaults(ctx.session);
if ((defaults != null) && (defaults["LanguageCode"] != null)) {
// user LanguageCode
- Locate the following code:
function get_current_user_login(ctx) {
var user_login = "";
var defaults = include.helpers.get_defaults(ctx.session);
if (defaults != null) {
user_login = ctx.session.open_item(defaults.CurrentUser)["Login Name"];
- Replace this code with the following:
function get_current_user_login(ctx) {
var user_login = "";
var defaults = include.od_helpers.get_defaults(ctx.session);
if (defaults != null) {
user_login = ctx.session.open_item(defaults.CurrentUser)["Login Name"];
- Locate the following code:
scheme.objects.get_object("Activity").get_field("ObjectState")["initial_value"] = 0;
scheme.objects.get_object("Activity").get_field("SiebelShared")["initial_value"] = true;
scheme.objects.get_object("Activity").get_field("SuppressFileAs")["initial_value_res"] ="lang_general_initial_fileas";
scheme.objects.get_object("Activity").get_field("Priority")["initial_value_res"] = "lang_action_priority_low";
scheme.objects.get_object("Activity").get_field("DueDate")["initial_value_fn"] = date_today_no_time;
scheme.objects.get_object("Activity")["initial_links_fn"] = prefill_activity_owner;
scheme.objects.get_object("Activity").get_field("BookId")["initial_value_fn"] = prefill_book;
- Replace this code with the following:
scheme.objects.get_object("Activity").get_field("ObjectState")["initial_value"] = 0; scheme.objects.get_object("Activity").get_field("SiebelShared")["initial_value"] = true; scheme.objects.get_object("Activity").get_field("SuppressFileAs")["initial_value_res"] = "lang_general_initial_fileas"; scheme.objects.get_object("Activity").get_field("Priority")["initial_value_fn"] = function(ctx, item_ex)
{
return get_pl_default_value(ctx, "ActivityPriorityPicklist", "lang_action_priority_low");
}
scheme.objects.get_object("Activity").get_field("DueDate")["initial_value_fn"] = date_today_no_time;
scheme.objects.get_object("Activity")["initial_links_fn"] = prefill_activity_owner;
scheme.objects.get_object("Activity").get_field("BookId")["initial_value_fn"] = prefill_book;
- Locate the following code:
scheme.objects.get_object("Contact").get_field("ObjectState")["initial_value"] = 0;
scheme.objects.get_object("Contact")["initial_links_fn"] = prefill_owner;
scheme.objects.get_object("Contact").get_field("CurrencyCode")["initial_value_fn"] = get_default_currency_code_od; scheme.objects.get_object("Contact").get_field("SuppressFileAs")["initial_value_res"] = "lang_general_initial_fileas"; scheme.objects.get_object("Contact").get_field("BookId")["initial_value_fn"] = prefill_book; scheme.objects.get_object("Account").get_field("SuppressFileAs")["initial_value_res"] = "lang_general_initial_fileas";
- Replace this code with the following:
scheme.objects.get_object("Contact").get_field("ObjectState")["initial_value"] = 0;
scheme.objects.get_object("Contact")["initial_links_fn"] = prefill_owner;
scheme.objects.get_object("Contact").get_field("CurrencyCode")["initial_value_fn"] =
get_default_currency_code_od;
scheme.objects.get_object("Contact").get_field("SuppressFileAs")["initial_value_fn"] = function(ctx, item_ex) {
// prefill only if empty
var existing_value = item_ex.fcd_item.get_instant("SuppressFileAs");
var result = helpers.is_null_or_empty(existing_value) ? ctx.session.res_string("lang_general_initial_fileas") : existing_value; return result;
};
scheme.objects.get_object("Contact").get_field("BookId")["initial_value_fn"] = prefill_book;
scheme.objects.get_object("Account").get_field("SuppressFileAs")["initial_value_res"] = "lang_general_initial_fileas";
- Locate the following code:
// Helper functions
function has_defaults_and_online() {
return helpers.get_defaults(ctx.session) != null && od_helpers.is_online(ctx);
}
function current_user_id() {
return helpers.get_current_user_id(ctx.session);
}
function is_current_user(id)
- Replace this code with the following:
// Helper functions
function has_defaults_and_online() {
return od_helpers.get_defaults(ctx.session) != null && od_helpers.is_online(ctx);
}
function current_user_id()
{
return od_helpers.get_current_user_id(ctx.session);
}
function is_current_user(id)
- Locate the following code:
switch (ol.item_ex().get_type()) {
case "Event":
proxy.item_ex().set_property("Type", ctx.session.res_string("lang_action_calendar_initial_type"));
//proxy.item_ex().set_property("Status", "Unscheduled");
proxy.item_ex().set_property("iCRMId", ol.item_ex().get_property("SearchKey"));
create_initial_associations(proxy, ol);
break;
case "Task":
proxy.item_ex().set_property("Type", ctx.session.res_string("lang_action_todo_initial_type"));
proxy.item_ex().set_property("iCRMId", ol.item_ex().get_property("SearchKey"));
create_initial_associations(proxy, ol);
break;
- Replace this code with the following:
switch (ol.item_ex().get_type()){
case "Event":
proxy.item_ex().set_property("Type", get_pl_default_value(ctx, "ActivityTypePicklist", "lang_action_calendar_initial_type"));
//proxy.item_ex().set_property("Status", "Unscheduled");
proxy.item_ex().set_property("iCRMId", ol.item_ex().get_property("SearchKey"));
create_initial_associations(proxy, ol);
break;
case "Task":
proxy.item_ex().set_property("Type", get_pl_default_value(ctx, "ActivityTypePicklist", "lang_action_todo_initial_type"));
proxy.item_ex().set_property("iCRMId", ol.item_ex().get_property("SearchKey"));
create_initial_associations(proxy, ol);
break;
- Locate the following code:
case "Mail":
//proxy.item_ex().set_property("Type", ol.item_ex().get_property("Inbound") == true ? "Email - Inbound" : "Email - Outbound");
proxy.item_ex().set_property("Status", ctx.session.res_string("lang_action_mail_initial_status"));
proxy.item_ex().set_property("Type", ctx.session.res_string("lang_action_mail_initial_type"));
proxy.item_ex().set_property("SiebelShared", ol.item_ex().get_property("Sent"));
create_initial_associations(proxy, ol);
break;
- Replace this code with the following:
case "Mail":
//proxy.item_ex().set_property("Type", ol.item_ex().get_property("Inbound") == true ? "Email - Inbound" : "Email - Outbound");
proxy.item_ex().set_property("Status", ctx.session.res_string("lang_action_mail_initial_status"));
proxy.item_ex().set_property("Type", get_pl_default_value(ctx, "ActivityTypePicklist", "lang_action_mail_initial_type"));
proxy.item_ex().set_property("SiebelShared", ol.item_ex().get_property("Sent"));
create_initial_associations(proxy, ol);
break;
- Locate the following code:
function contact_conversion_helper(ctx) {
this.business_address = "b";
this.home_address = "h";
function null_to_empty(value) {
return value == null ? "" : value;
}
var ol2od = {
"US": "USA",
"GB": "United Kingdom",
"RU": "Russian Federation"
}
function verify_country(country, code) {
if (null_to_empty(country) == "") return false;
if (code != null && ol2od[code] != null) {
return ol2od[code];
}
var od_country = ctx.session.find_item("AccountPrimaryBillToCountryPicklist", ctx.session.create_expression(
"Value", "eq", country));
return od_country && od_country.Value;
}
function verify_state(state) {
if (null_to_empty(state) == "") return false;
var od_state = ctx.session.find_item("AccountPrimaryBillToStatePicklist", ctx.session.create_expression("Value", "eq", state));
return od_state && od_state.Value;
}
function convert_to_ondemand(item_ex, dialog) {
//var item = ctx.form.item;
if (item_ex.get_type() == "Contact") {
var country = {};
country[this.home_address] = item_ex.get_property("Home Address Country");
country[this.business_address] = item_ex.get_property("Business Address Country");
var state = {};
state[this.home_address] = item_ex.get_property("Home Address State");
state[this.business_address] = item_ex.get_property("Business Address State");
var city = {};
city[this.home_address] = item_ex.get_property("Home Address City");
city[this.business_address] = item_ex.get_property("Business Address City");
var address = {};
address[this.home_address] = item_ex.get_property("Home Address Street");
address[this.business_address] = item_ex.get_property("Business Address Street");
var zip = {};
zip[this.home_address] = item_ex.get_property("Home Address Postal Code");
zip[this.business_address] = item_ex.get_property("Business Address Postal Code");
var country_code = {};
country_code[this.home_address] = item_ex.get_property("Address Country Code");
country_code[this.business_address] = item_ex.get_property("Address Country Code");
var at = ""; // address_type_to_use
var od_country
if (od_country = verify_country(country.b, country_code.b)) at = this.business_address;
else if (od_country = verify_country(country.h, country_code.h)) at = this.home_address;
if (at != "" && dialog != null) {
dialog.item = item_ex.fcd_item;
item_ex.set_property("AddrConvertedFrom", at);
dialog.country_value.value = od_country;
if (od_country == "USA" && verify_state(state[at])) dialog.state_value_pl.value = state[at];
else dialog.state_value.value = state[at];
dialog.city_value.value = city[at];
dialog.street_value.value = address[at].replace(/\n/g, " ");
dialog.zip_value.value = zip[at];
dialog.save();
}
}
}
this.convert_to_ondemand = convert_to_ondemand;
function empty_AddrConvertedFrom(item_ex) {
if (item_ex.get_type() == "Contact") {
//item_ex.set_property("AddrConvertedFrom", "");
//item.save();
}
}
function convert_to_outlook(item_ex) {
if (item_ex.get_type() == "Contact") {
var at = item_ex.get_property("AddrConvertedFrom") == "h" ? "Home " : "Business ";
var country = item_ex.get_property("AlternateCountry");
var state = item_ex.get_property("AlternateStateProvince") ? item_ex.get_property( "AlternateStateProvince") : item_ex.get_property("AlternateProvince");
var city = item_ex.get_property("AlternateCity");
var address = item_ex.get_property("AlternateAddress1");
var zip = item_ex.get_property("AlternateZipCode");
if (null_to_empty(country) + null_to_empty(state) + null_to_empty(city) + null_to_empty(address) + null_to_empty(zip) != "") {
item_ex.set_property(at + "Address Country", country);
item_ex.set_property(at + "Address State", state);
item_ex.set_property(at + "Address City", city);
item_ex.set_property(at + "Address Street", address);
item_ex.set_property(at + "Address Postal Code", zip);
//item.save();
}
}
}
this.convert_to_outlook = convert_to_outlook;
this.converted_to_platform = function(ctx, options, item_ex) {
empty_AddrConvertedFrom(item_ex);
}
this.converting_to_native = function(ctx, options, item_ex) {
convert_to_outlook(item_ex);
}
this.set_visible = function(ctx, options, item_ex, visible) {
if (!visible) item_ex.set_property("InvisibleOnGrids", visible ? null : "true");
}
}
- Replace this code with the following:
function contact_conversion_helper(ctx) {
function null_to_empty(value) {
return value == null ? "" : value;
}
function convert_to_outlook(ctx, item_ex) {
if (item_ex.get_type() == "Contact") {
var at = item_ex.get_property("AddrConvertedFrom");
at = helpers.ci_contains(["Business", "Home", "Other"], at) ? at : "Business";
var country = item_ex.get_property("AlternateCountry");
var state = item_ex.get_property("AlternateStateProvince") ? item_ex.get_property( "AlternateStateProvince") : item_ex.get_property("AlternateProvince");
var city = item_ex.get_property("AlternateCity");
var address = item_ex.get_property("AlternateAddress1");
var zip = item_ex.get_property("AlternateZipCode");
if (null_to_empty(country) + null_to_empty(state) + null_to_empty(city) + null_to_empty(address) + null_to_empty(zip) != "") {
item_ex.set_property(at + " Address Country", country_id_to_label(country));
item_ex.set_property(at + " Address State", state);
item_ex.set_property(at + " Address City", city);
item_ex.set_property(at + " Address Street", address);
item_ex.set_property(at + " Address Postal Code", zip);
}
}
function country_id_to_label(country_id) {
var result = null;
if (!helpers.is_null_or_empty(country_id)) {
var od_country = ctx.session.find_item("AccountPrimaryBillToCountryPicklist", ctx.session.create_expression( "Value", "eq", country_id));
result = od_country ? od_country.Label : result;
}
return result;
}
}
this.converted_to_platform = function(ctx, options, item_ex) {
convert_ol_to_crm_address(ctx, item_ex);
}
this.converting_to_native = function(ctx, options, item_ex) {
convert_to_outlook(ctx, item_ex);
}
this.set_visible = function(ctx, options, item_ex, visible) {
if (!visible) item_ex.set_property("InvisibleOnGrids", visible ? null : "true");
}
function convert_ol_to_crm_address(ctx, item_ex) {
// copy native address to CRM fields
var address_to_use;
if (is_address_populated(item_ex, "Business")) {
address_to_use = "Business";
}else if (is_address_populated(item_ex, "Home")) {
address_to_use = "Home";
} else if (is_address_populated(item_ex, "Other")) {
address_to_use = "Other";
}
if (address_to_use) {
var crm_country_id = ol_to_crm_country(item_ex, address_to_use);
item_ex.set_property("AlternateCountry", crm_country_id);
if (crm_country_id == "USA") {
var crm_state = ol_to_crm_state(item_ex, address_to_use);
item_ex.set_property("AlternateStateProvince", crm_state);
} else {
item_ex.set_property("AlternateProvince", item_ex.get_property(address_to_use + " Address State"));
}
item_ex.set_property("AlternateAddress1", item_ex.get_property(address_to_use + " Address Street"));
item_ex.set_property("AlternateCity", item_ex.get_property(address_to_use + " Address City"));
item_ex.set_property("AlternateZipCode", item_ex.get_property(address_to_use + " Address Postal Code"));
item_ex.set_property("AddrConvertedFrom", address_to_use);
}
function is_address_populated(item_ex, address_type) {
var result = item_ex.get_property(address_type + " Address City") || item_ex.get_property(address_type + " Address Country") || item_ex.get_property(address_type + " Address Postal Code") || item_ex.get_property( address_type + " Address State") || item_ex.get_property(address_type + " Address Street");
return !helpers.is_null_or_empty(result);
}
function ol_to_crm_country(item_ex, address_type) {
var mapping = [{
ol_code: 'AF',
ol_name: 'Afghanistan',
crm_id: 'Afghanistan'
}, {
ol_code: 'AL',
ol_name: 'Albania',
crm_id: 'Albania'
}, {
ol_code: 'DZ',
ol_name: 'Algeria',
crm_id: 'Algeria'
}, {
ol_code: 'AS',
ol_name: 'American Samoa',
crm_id: 'American Samoa'
}, {
ol_code: 'AD',
ol_name: 'Andorra',
crm_id: 'Andorra'
}, {
ol_code: 'AO',
ol_name: 'Angola',
crm_id: 'Angola'
}, {
ol_code: 'AI',
ol_name: 'Anguilla',
crm_id: 'Anguilla'
}, {
ol_code: 'AG',
ol_name: 'Antigua and Barbuda',
crm_id: 'Antigua and Barbuda'
}, {
ol_code: 'AR',
ol_name: 'Argentina',
crm_id: 'Argentina'
}, {
ol_code: 'AM',
ol_name: 'Armenia',
crm_id: 'Armenia'
}, {
ol_code: 'AW',
ol_name: 'Aruba',
crm_id: 'Aruba'
},
//{ ol_code: '', ol_name: 'Ashmore and Cartier Islands', crm_id: ''},
{
ol_code: 'AU',
ol_name: 'Australia',
crm_id: 'Australia'
}, {
ol_code: 'AT',
ol_name: 'Austria',
crm_id: 'Austria'
}, {
ol_code: 'AZ',
ol_name: 'Azerbaijan',
crm_id: 'Azerbaijan'
}, {
ol_code: 'BS',
ol_name: 'Bahamas',
crm_id: 'Bahamas'
}, {
ol_code: 'BH',
ol_name: 'Bahrain',
crm_id: 'Bahrain'
}, {
ol_code: 'UM',
ol_name: 'Baker Island',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'BD',
ol_name: 'Bangladesh',
crm_id: 'Bangladesh'
}, {
ol_code: 'BB',
ol_name: 'Barbados',
crm_id: 'Barbados'
}, {
ol_code: 'BY',
ol_name: 'Belarus',
crm_id: 'Belarus'
}, {
ol_code: 'BE',
ol_name: 'Belgium',
crm_id: 'Belgium'
}, {
ol_code: 'BZ',
ol_name: 'Belize',
crm_id: 'Belize'
}, {
ol_code: 'BJ',
ol_name: 'Benin',
crm_id: 'Benin'
}, {
ol_code: 'BM',
ol_name: 'Bermuda',
crm_id: 'Bermuda'
}, {
ol_code: 'BT',
ol_name: 'Bhutan',
crm_id: 'Bhutan'
}, {
ol_code: 'BO',
ol_name: 'Bolivia',
crm_id: 'Bolivia'
}, {
ol_code: 'BQ',
ol_name: 'Bonaire',
crm_id: 'Bonaire, Sint Eustatius & Saba'
}, {
ol_code: 'BA',
ol_name: 'Bosnia and Herzegovina',
crm_id: 'Bosnia and Herzegovina'
}, {
ol_code: 'BW',
ol_name: 'Botswana',
crm_id: 'Botswana'
}, {
ol_code: 'BV',
ol_name: 'Bouvet Island',
crm_id: 'Bouvet Island'
}, {
ol_code: 'BR',
ol_name: 'Brazil',
crm_id: 'Brazil'
}, {
ol_code: 'IO',
ol_name: 'British Indian Ocean Territory',
crm_id: 'British Indian Ocean Territory'
}, {
ol_code: 'VG',
ol_name: 'British Virgin Islands',
crm_id: 'Virgin Islands (British)'
}, {
ol_code: 'BN',
ol_name: 'Brunei Darussalam',
crm_id: 'Brunei Darussalam'
}, {
ol_code: 'BG',
ol_name: 'Bulgaria',
crm_id: 'Bulgaria'
}, {
ol_code: 'BF',
ol_name: 'Burkina Faso',
crm_id: 'Burkina Faso'
}, {
ol_code: 'BI',
ol_name: 'Burundi',
crm_id: 'Burundi'
}, {
ol_code: 'KH',
ol_name: 'Cambodia',
crm_id: 'Cambodia'
}, {
ol_code: 'CM',
ol_name: 'Cameroon',
crm_id: 'Cameroon'
}, {
ol_code: 'CA',
ol_name: 'Canada',
crm_id: 'Canada'
}, {
ol_code: 'CV',
ol_name: 'Cape Verde',
crm_id: 'Cape Verde'
}, {
ol_code: 'KY',
ol_name: 'Cayman Islands',
crm_id: 'Cayman Islands'
}, {
ol_code: 'CF',
ol_name: 'Central African Republic',
crm_id: 'Central African Republic'
}, {
ol_code: 'TD',
ol_name: 'Chad',
crm_id: 'Chad'
}, {
ol_code: 'CL',
ol_name: 'Chile',
crm_id: 'Chile'
}, {
ol_code: 'CN',
ol_name: 'China',
crm_id: 'China'
}, {
ol_code: 'CX',
ol_name: 'Christmas Island',
crm_id: 'Christmas Island'
}, {
ol_code: 'CC',
ol_name: 'Cocos (Keeling) Islands',
crm_id: 'Cocos (Keeling) Islands'
}, {
ol_code: 'CO',
ol_name: 'Colombia',
crm_id: 'Colombia'
}, {
ol_code: 'KM',
ol_name: 'Comoros',
crm_id: 'Comoros'
}, {
ol_code: 'CG',
ol_name: 'Congo',
crm_id: 'Congo'
}, {
ol_code: 'CD',
ol_name: 'Congo (DRC)',
crm_id: 'Congo, Democratic Republic of'
}, {
ol_code: 'CK',
ol_name: 'Cook Islands',
crm_id: 'Cook Islands'
},
//{ ol_code: '', ol_name: 'Coral Sea Islands', crm_id: ''},
{
ol_code: 'CR',
ol_name: 'Costa Rica',
crm_id: 'Costa Rica'
}, {
ol_code: 'CI',
ol_name: 'Cote d\'Ivoire',
crm_id: 'Ivory Coast'
}, {
ol_code: 'HR',
ol_name: 'Croatia',
crm_id: 'Croatia'
}, {
ol_code: 'CU',
ol_name: 'Cuba',
crm_id: 'Cuba'
}, {
ol_code: 'CW',
ol_name: 'Curaçao',
crm_id: 'Curacao'
}, {
ol_code: 'CY',
ol_name: 'Cyprus',
crm_id: 'Cyprus'
}, {
ol_code: 'CZ',
ol_name: 'Czech Republic',
crm_id: 'Czech Republic'
}, {
ol_code: 'DK',
ol_name: 'Denmark',
crm_id: 'Denmark'
}, {
ol_code: 'DJ',
ol_name: 'Djibouti',
crm_id: 'Djibouti'
}, {
ol_code: 'DM',
ol_name: 'Dominica',
crm_id: 'Dominica'
}, {
ol_code: 'DO',
ol_name: 'Dominican Republic',
crm_id: 'Dominican Republic'
}, {
ol_code: 'EC',
ol_name: 'Ecuador',
crm_id: 'Ecuador'
}, {
ol_code: 'EG',
ol_name: 'Egypt',
crm_id: 'Egypt'
}, {
ol_code: 'SV',
ol_name: 'El Salvador',
crm_id: 'El Salvador'
}, {
ol_code: 'GQ',
ol_name: 'Equatorial Guinea',
crm_id: 'Equatorial Guinea'
}, {
ol_code: 'ER',
ol_name: 'Eritrea',
crm_id: 'Eritrea'
}, {
ol_code: 'EE',
ol_name: 'Estonia',
crm_id: 'Estonia'
}, {
ol_code: 'ET',
ol_name: 'Ethiopia',
crm_id: 'Ethiopia'
}, {
ol_code: 'FK',
ol_name: 'Falkland Islands (Islas Malvinas)',
crm_id: 'Falkland Islands (Malvinas)'
}, {
ol_code: 'FO',
ol_name: 'Faroe Islands',
crm_id: 'Faroe Islands'
}, {
ol_code: 'FJ',
ol_name: 'Fiji',
crm_id: 'Fiji'
}, {
ol_code: 'FI',
ol_name: 'Finland',
crm_id: 'Finland'
}, {
ol_code: 'FR',
ol_name: 'France',
crm_id: 'France'
}, {
ol_code: 'GF',
ol_name: 'French Guiana',
crm_id: 'French Guiana'
}, {
ol_code: 'PF',
ol_name: 'French Polynesia',
crm_id: 'French Polynesia'
}, {
ol_code: 'TF',
ol_name: 'French Southern and Antarctic Lands',
crm_id: 'French Southern Territories'
}, {
ol_code: 'GA',
ol_name: 'Gabon',
crm_id: 'Gabon'
}, {
ol_code: 'GM',
ol_name: 'Gambia',
crm_id: 'Gambia'
}, {
ol_code: 'GE',
ol_name: 'Georgia',
crm_id: 'Georgia'
}, {
ol_code: 'DE',
ol_name: 'Germany',
crm_id: 'Germany'
}, {
ol_code: 'GH',
ol_name: 'Ghana',
crm_id: 'Ghana'
}, {
ol_code: '',
ol_name: 'Gibraltar',
crm_id: 'Gibraltar'
}, {
ol_code: 'GR',
ol_name: 'Greece',
crm_id: 'Greece'
}, {
ol_code: 'GL',
ol_name: 'Greenland',
crm_id: 'Greenland'
}, {
ol_code: 'GD',
ol_name: 'Grenada',
crm_id: 'Grenada'
}, {
ol_code: 'GP',
ol_name: 'Guadeloupe',
crm_id: 'Guadeloupe'
}, {
ol_code: 'GU',
ol_name: 'Guam',
crm_id: 'Guam'
}, {
ol_code: 'GT',
ol_name: 'Guatemala',
crm_id: 'Guatemala'
}, {
ol_code: '',
ol_name: 'Guernsey',
crm_id: 'Guernsey'
}, {
ol_code: 'GN',
ol_name: 'Guinea',
crm_id: 'Guinea'
}, {
ol_code: 'GW',
ol_name: 'Guinea-Bissau',
crm_id: 'Guinea-bissau'
}, {
ol_code: 'GY',
ol_name: 'Guyana',
crm_id: 'Guyana'
}, {
ol_code: 'HT',
ol_name: 'Haiti',
crm_id: 'Haiti'
}, {
ol_code: 'HM',
ol_name: 'Heard Island and McDonald Islands',
crm_id: 'Heard and Mc Donald Islands'
}, {
ol_code: 'VA',
ol_name: 'Holy See (Vatican City)',
crm_id: 'Holy See (Vatican City State)'
}, {
ol_code: 'HN',
ol_name: 'Honduras',
crm_id: 'Honduras'
}, {
ol_code: 'HK',
ol_name: 'Hong Kong SAR',
crm_id: 'Hong Kong'
}, {
ol_code: 'UM',
ol_name: 'Howland Island',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'HU',
ol_name: 'Hungary',
crm_id: 'Hungary'
}, {
ol_code: 'IS',
ol_name: 'Iceland',
crm_id: 'Iceland'
}, {
ol_code: 'IN',
ol_name: 'India',
crm_id: 'India'
}, {
ol_code: 'ID',
ol_name: 'Indonesia',
crm_id: 'Indonesia'
}, {
ol_code: 'IR',
ol_name: 'Iran',
crm_id: 'Iran'
}, {
ol_code: 'IQ',
ol_name: 'Iraq',
crm_id: 'Iraq'
}, {
ol_code: 'IE',
ol_name: 'Ireland',
crm_id: 'Ireland'
}, {
ol_code: '',
ol_name: 'Isle of Man',
crm_id: 'Isle of Man'
}, {
ol_code: 'IL',
ol_name: 'Israel',
crm_id: 'Israel'
}, {
ol_code: 'IT',
ol_name: 'Italy',
crm_id: 'Italy'
}, {
ol_code: 'JM',
ol_name: 'Jamaica',
crm_id: 'Jamaica'
}, {
ol_code: 'JP',
ol_name: 'Japan',
crm_id: 'Japan'
}, {
ol_code: 'UM',
ol_name: 'Jarvis Island',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: '',
ol_name: 'Jersey',
crm_id: 'Jersey'
}, {
ol_code: 'UM',
ol_name: 'Johnston Atoll',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'JO',
ol_name: 'Jordan',
crm_id: 'Jordan'
}, {
ol_code: 'KZ',
ol_name: 'Kazakhstan',
crm_id: 'Kazakhstan'
}, {
ol_code: 'KE',
ol_name: 'Kenya',
crm_id: 'Kenya'
}, {
ol_code: 'UM',
ol_name: 'Kingman Reef',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'KI',
ol_name: 'Kiribati',
crm_id: 'Kiribati'
}, {
ol_code: 'KR',
ol_name: 'Korea',
crm_id: 'Korea'
}, {
ol_code: 'KP',
ol_name: 'North Korea',
crm_id: 'Korea, Democratic People\'s Rep'
}, {
ol_code: 'KW',
ol_name: 'Kuwait',
crm_id: 'Kuwait'
}, {
ol_code: 'KG',
ol_name: 'Kyrgyzstan',
crm_id: 'Kyrgyzstan'
}, {
ol_code: 'LA',
ol_name: 'Laos',
crm_id: 'Laos'
}, {
ol_code: 'LV',
ol_name: 'Latvia',
crm_id: 'Latvia'
}, {
ol_code: 'LB',
ol_name: 'Lebanon',
crm_id: 'Lebanon'
}, {
ol_code: 'LS',
ol_name: 'Lesotho',
crm_id: 'Lesotho'
}, {
ol_code: 'LR',
ol_name: 'Liberia',
crm_id: 'Liberia'
}, {
ol_code: 'LY',
ol_name: 'Libya',
crm_id: 'Libyan Arab Jamahiriya'
}, {
ol_code: 'LI',
ol_name: 'Liechtenstein',
crm_id: 'Liechtenstein'
}, {
ol_code: 'LT',
ol_name: 'Lithuania',
crm_id: 'Lithuania'
}, {
ol_code: 'LU',
ol_name: 'Luxembourg',
crm_id: 'Luxembourg'
}, {
ol_code: 'MO',
ol_name: 'Macau SAR',
crm_id: 'Macau'
}, {
ol_code: 'MK',
ol_name: 'Macedonia, FYRO',
crm_id: 'Macedonia'
}, {
ol_code: 'MG',
ol_name: 'Madagascar',
crm_id: 'Madagascar'
}, {
ol_code: 'MW',
ol_name: 'Malawi',
crm_id: 'Malawi'
}, {
ol_code: 'MY',
ol_name: 'Malaysia',
crm_id: 'Malaysia'
}, {
ol_code: 'MV',
ol_name: 'Maldives',
crm_id: 'Maldives'
}, {
ol_code: 'ML',
ol_name: 'Mali',
crm_id: 'Mali'
}, {
ol_code: 'MT',
ol_name: 'Malta',
crm_id: 'Malta'
}, {
ol_code: 'MH',
ol_name: 'Marshall Islands',
crm_id: 'Marshall Islands'
}, {
ol_code: 'MQ',
ol_name: 'Martinique',
crm_id: 'Martinique'
}, {
ol_code: 'MR',
ol_name: 'Mauritania',
crm_id: 'Mauritania'
}, {
ol_code: 'MU',
ol_name: 'Mauritius',
crm_id: 'Mauritius'
}, {
ol_code: 'YT',
ol_name: 'Mayotte',
crm_id: 'Mayotte'
}, {
ol_code: 'MX',
ol_name: 'Mexico',
crm_id: 'Mexico'
}, {
ol_code: 'FM',
ol_name: 'Micronesia',
crm_id: 'Micronesia, Federated States o'
}, {
ol_code: 'UM',
ol_name: 'Midway Islands',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'MD',
ol_name: 'Moldova',
crm_id: 'Moldova, Republic of'
}, {
ol_code: 'MC',
ol_name: 'Monaco',
crm_id: 'Monaco'
}, {
ol_code: 'MN',
ol_name: 'Mongolia',
crm_id: 'Mongolia'
}, {
ol_code: 'ME',
ol_name: 'Montenegro',
crm_id: 'Montenegro'
}, {
ol_code: 'MS',
ol_name: 'Montserrat',
crm_id: 'Montserrat'
}, {
ol_code: 'MA',
ol_name: 'Morocco',
crm_id: 'Morocco'
}, {
ol_code: 'MZ',
ol_name: 'Mozambique',
crm_id: 'Mozambique'
}, {
ol_code: 'MM',
ol_name: 'Myanmar',
crm_id: 'Myanmar'
}, {
ol_code: 'NA',
ol_name: 'Namibia',
crm_id: 'Namibia'
}, {
ol_code: 'NR',
ol_name: 'Nauru',
crm_id: 'Nauru'
}, {
ol_code: 'NP',
ol_name: 'Nepal',
crm_id: 'Nepal'
}, {
ol_code: 'NL',
ol_name: 'Netherlands',
crm_id: 'Netherlands'
}, {
ol_code: 'NC',
ol_name: 'New Caledonia',
crm_id: 'New Caledonia'
}, {
ol_code: 'NZ',
ol_name: 'New Zealand',
crm_id: 'New Zealand'
}, {
ol_code: 'NI',
ol_name: 'Nicaragua',
crm_id: 'Nicaragua'
}, {
ol_code: 'NE',
ol_name: 'Niger',
crm_id: 'Niger'
}, {
ol_code: 'NG',
ol_name: 'Nigeria',
crm_id: 'Nigeria'
}, {
ol_code: 'NU',
ol_name: 'Niue',
crm_id: 'Niue'
}, {
ol_code: 'NF',
ol_name: 'Norfolk Island',
crm_id: 'Norfolk Island'
}, {
ol_code: 'MP',
ol_name: 'Northern Mariana Islands',
crm_id: 'Northern Mariana Islands'
}, {
ol_code: 'NO',
ol_name: 'Norway',
crm_id: 'Norway'
}, {
ol_code: 'OM',
ol_name: 'Oman',
crm_id: 'Oman'
}, {
ol_code: 'PK',
ol_name: 'Pakistan',
crm_id: 'Pakistan'
}, {
ol_code: 'PW',
ol_name: 'Palau',
crm_id: 'Palau'
}, {
ol_code: 'PS',
ol_name: 'Palestinian Authority',
crm_id: 'Palestinian Authority'
}, {
ol_code: 'UM',
ol_name: 'Palmyra Atoll',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'PA',
ol_name: 'Panama',
crm_id: 'Panama'
}, {
ol_code: 'PG',
ol_name: 'Papua New Guinea',
crm_id: 'Papua New Guinea'
}, {
ol_code: 'PY',
ol_name: 'Paraguay',
crm_id: 'Paraguay'
}, {
ol_code: 'PE',
ol_name: 'Peru',
crm_id: 'Peru'
}, {
ol_code: 'PH',
ol_name: 'Philippines',
crm_id: 'Philippines'
}, {
ol_code: 'PN',
ol_name: 'Pitcairn Island',
crm_id: 'Pitcairn Islands'
}, {
ol_code: 'PL',
ol_name: 'Poland',
crm_id: 'Poland'
}, {
ol_code: 'PT',
ol_name: 'Portugal',
crm_id: 'Portugal'
}, {
ol_code: 'PR',
ol_name: 'Puerto Rico',
crm_id: 'Puerto Rico'
}, {
ol_code: 'QA',
ol_name: 'Qatar',
crm_id: 'Qatar'
}, {
ol_code: 'RE',
ol_name: 'Réunion',
crm_id: 'Reunion'
}, {
ol_code: 'RO',
ol_name: 'Romania',
crm_id: 'Romania'
}, {
ol_code: 'RU',
ol_name: 'Russia',
crm_id: 'Russian Federation'
}, {
ol_code: 'RW',
ol_name: 'Rwanda',
crm_id: 'Rwanda'
},
//{ ol_code: 'XS', ol_name: 'Saba', crm_id: ''},
{
ol_code: 'SH',
ol_name: 'Saint Helena',
crm_id: 'St. Helena'
}, {
ol_code: 'PM',
ol_name: 'Saint Pierre and Miquelon',
crm_id: 'St. Pierre and Miquelon'
}, {
ol_code: 'AS',
ol_name: 'Samoa',
crm_id: 'Samoa'
}, {
ol_code: 'SM',
ol_name: 'San Marino',
crm_id: 'San Marino'
}, {
ol_code: 'ST',
ol_name: 'São Tomé and Príncipe',
crm_id: 'Sao Tome and Principe'
}, {
ol_code: 'SA',
ol_name: 'Saudi Arabia',
crm_id: 'Saudi Arabia'
}, {
ol_code: 'SN',
ol_name: 'Senegal',
crm_id: 'Senegal'
}, {
ol_code: 'YU',
ol_name: 'Serbia',
crm_id: 'Serbia and Montenegro'
}, {
ol_code: 'SC',
ol_name: 'Seychelles',
crm_id: 'Seychelles'
}, {
ol_code: 'SL',
ol_name: 'Sierra Leone',
crm_id: 'Sierra Leone'
}, {
ol_code: 'SG', ol_name: 'Singapore',
crm_id: 'Singapore'
},
//{ ol_code: 'XE', ol_name: 'Sint Eustatius', crm_id: ''},
{
ol_code: 'SX',
ol_name: 'Sint Maarten',
crm_id: 'Sint Maarten'
}, {
ol_code: 'SK',
ol_name: 'Slovak Republic',
crm_id: 'Slovakia'
}, {
ol_code: 'SI',
ol_name: 'Slovenia',
crm_id: 'Slovenia'
}, {
ol_code: 'SB',
ol_name: 'Solomon Islands',
crm_id: 'Solomon Islands'
}, {
ol_code: 'SO',
ol_name: 'Somalia',
crm_id: 'Somalia'
}, {
ol_code: 'ZA',
ol_name: 'South Africa',
crm_id: 'South Africa'
}, {
ol_code: 'GS',
ol_name: 'South Georgia and the South Sandwich Islands',
crm_id: 'South Georgia and the South Sa'
}, {
ol_code: 'SS',
ol_name: 'South Sudan',
crm_id: 'South Sudan'
}, {
ol_code: 'ES',
ol_name: 'Spain',
crm_id: 'Spain'
}, {
ol_code: 'LK',
ol_name: 'Sri Lanka',
crm_id: 'Sri Lanka'
}, {
ol_code: 'KN',
ol_name: 'St. Kitts and Nevis',
crm_id: 'St. Kitts and Nevis'
}, {
ol_code: 'LC',
ol_name: 'St. Lucia',
crm_id: 'St. Lucia'
}, {
ol_code: 'VC',
ol_name: 'St. Vincent and the Grenadines',
crm_id: 'St. Vincent and Grenadines'
}, {
ol_code: 'SD',
ol_name: 'Sudan',
crm_id: 'Sudan'
}, {
ol_code: 'SR',
ol_name: 'Surinam',
crm_id: 'Suriname'
}, {
ol_code: 'SJ',
ol_name: 'Svalbard and Jan Mayen Islands',
crm_id: 'Svalbard and Jan Mayen Islands'
}, {
ol_code: 'SZ',
ol_name: 'Swaziland',
crm_id: 'Swaziland'
}, {
ol_code: 'SE',
ol_name: 'Sweden',
crm_id: 'Sweden'
}, {
ol_code: 'CH',
ol_name: 'Switzerland',
crm_id: 'Switzerland'
}, {
ol_code: 'SY',
ol_name: 'Syria',
crm_id: 'Syrian Arab Republic'
}, {
ol_code: 'TW',
ol_name: 'Taiwan',
crm_id: 'Taiwan'
}, {
ol_code: 'TJ',
ol_name: 'Tajikistan',
crm_id: 'Tajikistan'
}, {
ol_code: 'TZ',
ol_name: 'Tanzania',
crm_id: 'Tanzania, United Republic of'
}, {
ol_code: 'TH',
ol_name: 'Thailand',
crm_id: 'Thailand'
}, {
ol_code: 'TG',
ol_name: 'Togo',
crm_id: 'Togo'
}, {
ol_code: 'TK',
ol_name: 'Tokelau',
crm_id: 'Tokelau'
}, {
ol_code: 'TO',
ol_name: 'Tonga',
crm_id: 'Tonga'
}, {
ol_code: 'TT',
ol_name: 'Trinidad and Tobago',
crm_id: 'Trinidad and Tobago'
}, {
ol_code: 'TN',
ol_name: 'Tunisia',
crm_id: 'Tunisia'
}, {
ol_code: 'TR',
ol_name: 'Turkey',
crm_id: 'Turkey'
}, {
ol_code: 'TM',
ol_name: 'Turkmenistan',
crm_id: 'Turkmenistan'
}, {
ol_code: 'TC',
ol_name: 'Turks and Caicos Islands',
crm_id: 'Turks and Caicos Islands'
}, {
ol_code: 'TV',
ol_name: 'Tuvalu',
crm_id: 'Tuvalu'
}, {
ol_code: 'VI',
ol_name: 'U.S. Virgin Islands',
crm_id: 'Virgin Islands (U.S.)'
}, {
ol_code: 'US',
ol_name: 'United States of America',
crm_id: 'USA'
}, {
ol_code: 'UG',
ol_name: 'Uganda',
crm_id: 'Uganda'
}, {
ol_code: 'UA',
ol_name: 'Ukraine',
crm_id: 'Ukraine'
}, {
ol_code: 'AE',
ol_name: 'United Arab Emirates',
crm_id: 'United Arab Emirates'
}, {
ol_code: 'GB',
ol_name: 'United Kingdom',
crm_id: 'United Kingdom'
}, {
ol_code: 'UY',
ol_name: 'Uruguay',
crm_id: 'Uruguay'
}, {
ol_code: 'UZ',
ol_name: 'Uzbekistan',
crm_id: 'Uzbekistan'
}, {
ol_code: 'VU',
ol_name: 'Vanuatu',
crm_id: 'Vanuatu'
}, {
ol_code: 'VE',
ol_name: 'Venezuela',
crm_id: 'Venezuela'
}, {
ol_code: 'VN',
ol_name: 'Vietnam',
crm_id: 'Vietnam'
}, {
ol_code: 'UM',
ol_name: 'Wake Island',
crm_id: 'United States Minor Outlying I'
}, {
ol_code: 'WF',
ol_name: 'Wallis and Futuna',
crm_id: 'Wallis and Futuna Islands'
}, {
ol_code: 'YE',
ol_name: 'Yemen',
crm_id: 'Yemen'
}, {
ol_code: 'ZM',
ol_name: 'Zambia',
crm_id: 'Zambia'
}, {
ol_code: 'ZW',
ol_name: 'Zimbabwe',
crm_id: 'Zimbabwe'
}
];
var ol_country_text = item_ex.get_property(address_type + " Address Country");
var ol_country_text_lc = ol_country_text ? ol_country_text.toLowerCase() : ol_country_text;
var ol_country_code = item_ex.get_property(address_type + " Address Country Code");
var result = null;
helpers.for_each2(mapping, function(el) {
if (ol_country_code && ol_country_code == el.ol_code || ol_country_text && ol_country_text_lc ==
el.ol_code.toLowerCase() || ol_country_text_lc == el.ol_name.toLowerCase() ||
ol_country_text_lc == el.crm_id.toLowerCase()) {
result = el.crm_id;
}
});
if (!result && !helpers.is_null_or_empty(ol_country_text)) {
var od_country = ctx.session.find_item("AccountPrimaryBillToCountryPicklist", ctx.session.create_expression("Label", "eq", ol_country_text));
result = od_country ? od_country.Value : result;
}
return result;
}
function ol_to_crm_state(item_ex, address_type) {
var ol_state = item_ex.get_property(address_type + " Address State");
var result = null;
if (ol_state) {
var filter = ctx.session.create_criteria("or");
filter.add(ctx.session.create_expression("Value", "eq", ol_state));
filter.add(ctx.session.create_expression("Label", "eq", ol_state));
var crm_state = ctx.session.find_item("AccountPrimaryBillToStatePicklist", filter);
result = crm_state ? crm_state.Value : result;
}
return result;
}
}
}
- Add the following code to the end of the file:
function get_pl_default_value(ctx, picklist_name, defailt_value_res)
{
var filter = ctx.session.create_criteria("and"),default_value = ctx.session.res_string(defailt_value_res);
filter.add(ctx.session.create_expression("Value", "eq", default_value));
var pl_item = ctx.session.find_item(picklist_name, filter);
return pl_item ? default_value : null;
}
Update the forms_12*.xml file as follows:
- Locate the following code:
</cell>
</stack>
</cell>
<cell size="211">
<stack layout="horz">
<cell size="7">
<stack layout="vert" spacing="1">
- Replace this code with the following:
</cell>
</stack>
</cell>
<cell size="238">
<stack layout="horz">
<cell size="7">
<stack layout="vert" spacing="1">
- Locate the following code:
<control id="lbl_file_as" window_id="0x11a4" tab_order="7"/> </cell>
<cell size="22">
<static id="0x20010" tab_order="9"> <text>#lbl_time_zone</text> </static>
</cell>
<cell size="22">
<static id="0x20012" tab_order="11"> <text>#lbl_contact_currency</text> </static>
</cell>
<cell size="22">
<static id="0x20014" tab_order="13"> <text>#lbl_contact_type</text> </static>
</cell>
<cell size="22">
<static id="0x20016" tab_order="15"> <text>#lbl_lead_source</text> </static>
</cell>
- Replace this code with the following:
<control id="lbl_file_as" window_id="0x11a4" tab_order="7"/> </cell>
<cell size="22">
<control id="CompanyNameLbl" window_id="0x11a2" tab_order="9"/> </cell>
<cell size="22">
<static id="0x20010" tab_order="11"> <text>#lbl_time_zone</text> </static>
</cell>
<cell size="22">
<static id="0x20012" tab_order="13"> <text>#lbl_contact_currency</text> </static>
</cell>
<cell size="22">
<static id="0x20014" tab_order="15"> <text>#lbl_contact_type</text> </static>
</cell>
<cell size="22">
<static id="0x20016" tab_order="17"> <text>#lbl_lead_source</text> </static>
</cell>
- Locate the following code:
<control id="cb_file_as" window_id="0x1182" tab_order="8"/> </cell>
<cell size="22">
<edit id="TimeZoneName" max_chars="100" tab_order="10">
<field value="string">TimeZoneName</field>
</edit>
</cell>
<cell size="22">
<combobox id="CurrencyCode" tab_order="12">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="AccountCurrencyCodePicklist"/>
<order_by>
- Replace this code with the following:
<control id="cb_file_as" window_id="0x1182" tab_order="8"/> </cell>
<cell size="22">
<control id="CompanyName" window_id="0x1181" tab_order="10"/> </cell>
<cell size="22">
<edit id="TimeZoneName" max_chars="100" tab_order="12">
<field value="string">TimeZoneName</field>
</edit>
</cell>
<cell size="22">
<combobox id="CurrencyCode" tab_order="14">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="AccountCurrencyCodePicklist"/>
<order_by>
- Locate the following code:
</combobox>
</cell>
<cell size="22">
<combobox id="ContactType" tab_order="14">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ContactContactTypePicklist"/>
<order_by>
- Replace this code with the following:
</combobox>
</cell>
<cell size="22">
<combobox id="ContactType" tab_order="16">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ContactContactTypePicklist"/>
<order_by>
- Locate the following code:
</combobox>
</cell>
<cell size="22">
<combobox id="LeadSource" tab_order="16">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ContactLeadSourcePicklist"/>
<order_by>
- Replace this code with the following:
</combobox>
</cell>
<cell size="22">
<combobox id="LeadSource" tab_order="18">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ContactLeadSourcePicklist"/>
<order_by>
- Locate the following code:
<cell size="16">
<stack layout="horz">
<cell size="110">
<static id="0x20050" tab_order="40"> <text>#head_description</text> </static>
</cell>
- Replace this code with the following:
<cell size="16">
<stack layout="horz">
<cell size="110">
<static id="0x20050" tab_order="240"> <text>#head_description</text> </static>
</cell>
- Locate the following code:
<cell>
<stack layout="horz" padding="5">
<cell>
<control id="description" tab_order="41" window_id="0x103f"/> </cell>
</stack>
</cell>
- Replace this code with the following:
<cell>
<stack layout="horz" padding="5">
<cell>
<control id="description" tab_order="241" window_id="0x103f"/>
</cell>
</stack>
</cell>
- Locate the following code:
<cell size="16">
<stack layout="horz">
<cell size="70">
<static id="0x20043" tab_order="42"> <text>#head_activities</text> </static>
</cell>
- Replace this code with the following:
<cell size="16">
<stack layout="horz">
<cell size="70">
<static id="0x20043" tab_order="242"> <text>#head_activities</text> </static>
</cell>
- Locate the following code:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="activities_view" tab_order="43">
<source type="auto" name="ActivityJointContact"/>
<view id="activities:form_view-mvg"/>
<restriction>
- Replace this code with the following:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="activities_view" tab_order="243">
<source type="auto" name="ActivityJointContact"/>
<view id="activities:form_view-mvg"/>
<restriction>
- Locate the following code:
<cell size="22">
<stack layout="horz" spacing="5" padding="5">
<cell size="140" attraction="far"> <button id="btn_delete_activity" tab_order="46" image="button_image:Remove:16" align="left">
<text>#lbl_remove_activity</text>
</button> </cell>
<cell size="140" attraction="far"> <button id="btn_new_task" tab_order="45" image="type_image:Activity:16" align="left">
<text>#btn_new_task</text>
</button> </cell>
<cell size="140" attraction="far">
<button id="btn_new_appt" tab_order="44" image="type_image:Activity:16" align="left">
<text>#btn_new_appointment</text>
</button>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz" spacing="5" padding="5">
<cell size="140" attraction="far"> <button id="btn_delete_activity" tab_order="246" image="button_image:Remove:16" align="left">
<text>#lbl_remove_activity</text>
</button> </cell>
<cell size="140" attraction="far">
<button id="btn_new_task" tab_order="245" image="type_image:Activity:16" align="left">
<text>#btn_new_task</text>
</button> </cell>
<cell size="140" attraction="far">
<button id="btn_new_appt" tab_order="244" image="type_image:Activity:16" align="left">
<text>#btn_new_appointment</text>
</button>
</cell>
- Locate the following code:
<cell size="16">
<stack layout="horz">
<cell size="35">
<static id="0x20052" tab_order="47"> <text>#head_notes</text> </static>
</cell>
- Replace this code with the following:
<cell size="16">
<stack layout="horz">
<cell size="35">
<static id="0x20052" tab_order="247"> <text>#head_notes</text> </static>
</cell>
- Locate the following code:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="notes_view" tab_order="48">
<source type="auto" name="Contact.Note"/>
<view id="crm_notes:form_view"/>
<restriction>
- Replace this code with the following:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="notes_view" tab_order="248">
<source type="auto" name="Contact.Note"/>
<view id="crm_notes:form_view"/>
<restriction>
- Locate the following code:
<cell size="22">
<stack layout="horz" spacing="5" padding="5">
<cell size="140" attraction="far"> <button id="btn_delete_note" tab_order="50" image="button_image:Remove:16" align="left">
<text>#lbl_delete_note</text>
</button></cell>
<cell size="140" attraction="far"> <button id="btn_add_note" tab_order="49" image="type_image:Note:16" align="left">
<text>#lbl_new_note</text>
</button>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz" spacing="5" padding="5">
<cell size="140" attraction="far"> <button id="btn_delete_note" tab_order="250" image="button_image:Remove:16" align="left">
<text>#lbl_delete_note</text>
</button> </cell>
<cell size="140" attraction="far"> <button id="btn_add_note" tab_order="249" image="type_image:Note:16" align="left">
<text>#lbl_new_note</text>
</button>
</cell>
- Locate the following code:
<cell>
<stack layout="horz">
<cell size="85">
<static id="PhoneNumbersCaption" tab_order="17"> <text>#head_phone_pumbers</text> </static>
</cell>
- Replace this code with the following:
<cell>
<stack layout="horz">
<cell size="85">
<static id="PhoneNumbersCaption" tab_order="19"> <text>#head_phone_pumbers</text> </static>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_phone1" tab_order="18" window_id="0x1113"/> </cell>
<cell size="23">
<control id="dd_phone1" tab_order="19" window_id="0x110a"/> </cell>
</stack>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_phone1" tab_order="20" window_id="0x1113"/> </cell>
<cell size="23">
<control id="dd_phone1" tab_order="21" window_id="0x110a"/> </cell>
</stack>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_phone4" tab_order="21" window_id="0x1116"/> </cell>
<cell size="23">
<control id="dd_phone4" tab_order="22" window_id="0x110d"/> </cell>
</stack>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_phone4" tab_order="23" window_id="0x1116"/></cell>
<cell size="23">
<control id="dd_phone4" tab_order="24" window_id="0x110d"/> </cell>
</stack>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_phone3" tab_order="24" window_id="0x1115"/> </cell>
<cell size="23">
<control id="dd_phone3" tab_order="25" window_id="0x110c"/> </cell>
</stack>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_phone3" tab_order="26" window_id="0x1115"/> </cell>
<cell size="23">
<control id="dd_phone3" tab_order="27" window_id="0x110c"/> </cell>
</stack>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_email" tab_order="27" window_id="0x1101"/> </cell>
<!--<cell size="5" attraction="far"></cell>-->
<cell size="23" attraction="far">
<control id="dd_email" tab_order="28" window_id="0x111b"/> </cell>
</stack>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell size="138">
<control id="btn_email" tab_order="29" window_id="0x1101"/> </cell>
<!--<cell size="5" attraction="far"></cell>-->
<cell size="23" attraction="far">
<control id="dd_email" tab_order="30" window_id="0x111b"/> </cell>
</stack>
</cell>
- Locate the following code:
<cell>
<stack spacing="5" layout="vert">
<cell size="22">
<control id="edit_phone1" tab_order="20" window_id="0x1001"/> </cell>
<cell size="22">
<control id="edit_phone4" tab_order="23" window_id="0x1004"/> </cell>
<cell size="22">
<control id="edit_phone3" tab_order="26" window_id="0x1003"/> </cell>
<cell size="22">
<control id="edit_email" tab_order="29" window_id="0x1018"/> </cell>
<cell size="22">
<checkbox id="0x20015" tab_order="30">
<field>NeverEmail</field> <text>#lbl_never_email</text> </checkbox>
- Replace this code with the following:
<cell>
<stack spacing="5" layout="vert">
<cell size="22">
<control id="edit_phone1" tab_order="22" window_id="0x1001"/></cell>
<cell size="22">
<control id="edit_phone4" tab_order="25" window_id="0x1004"/> </cell>
<cell size="22">
<control id="edit_phone3" tab_order="28" window_id="0x1003"/> </cell>
<cell size="22">
<control id="edit_email" tab_order="31" window_id="0x1018"/> </cell>
<cell size="22">
<checkbox id="0x20015" tab_order="32">
<field>NeverEmail</field> <text>#lbl_never_email</text> </checkbox>
- Locate the following code:
<cell size="161">
<stack spacing="5" layout="vert">
<cell size="22"> <button id="btn_account_address" tab_order="31">
<text>#btn_account_address_caption</text>
</button> </cell>
<cell size="22"> <button id="btn_contact_address" tab_order="33">
<text>#btn_contact_address_caption</text>
</button> </cell>
- Replace this code with the following:
<cell size="161">
<stack spacing="5" layout="vert">
<cell size="22"> <button id="btn_account_address" tab_order="231">
<text>#btn_account_address_caption</text>
</button> </cell>
<cell size="22"> <button id="btn_contact_address" tab_order="233">
<text>#btn_contact_address_caption</text>
</button> </cell>
- Locate the following code:
<cell>
<stack spacing="5" layout="vert">
<cell size="22">
<scriptable_edit id="BusinessAddressString" tab_order="32">
<field value="string"/> </scriptable_edit>
</cell>
- Replace this code with the following:
<cell>
<stack spacing="5" layout="vert">
<cell size="22">
<scriptable_edit id="BusinessAddressString" tab_order="232">
<field value="string"/> </scriptable_edit>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell>
<scriptable_edit id="PrimaryAddrString" tab_order="34"> <field value="string"/>
</scriptable_edit>
</cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell>
<scriptable_edit id="PrimaryAddrString" tab_order="234"> <field value="string"/>
</scriptable_edit>
</cell>
- Locate the following code:
<cell size="161">
<stack spacing="5" layout="vert">
<cell size="22">
<static id="0x20008" tab_order="35"> <text>#lbl_contact_team</text> </static>
</cell>
- Replace this code with the following:
<cell size="161">
<stack spacing="5" layout="vert">
<cell size="22">
<static id="0x20008" tab_order="235"> <text>#lbl_contact_team</text> </static>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell>
<autocomplete_list id="TeamToContact" tab_order="36">
<items format=":[:{UserId@User/(:[:(FirstName):])}:] :[:{UserId@User/(:[:(LastName):])}:]">
<source type="auto" name="Contact.User.Association"/>
<restriction>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell>
<autocomplete_list id="TeamToContact" tab_order="236">
<items format=":[:{UserId@User/(:[:(FirstName):])}:] :[:{UserId@User/(:[:(LastName):])}:]">
<source type="auto" name="Contact.User.Association"/>
<restriction>
- Locate the following code:
</cell>
<cell size="5"/>
<cell size="22">
<button id="btn_mvgContactTeam" tab_order="37">
<text>...</text>
</button>
</cell>
- Replace this code with the following:
</cell>
<cell size="5"/>
<cell size="22">
<button id="btn_mvgContactTeam" tab_order="237">
<text>...</text>
</button>
</cell>
- Locate the following code:
<cell size="22">
<stack layout="horz">
<cell>
<scriptable_edit id="book_of_business" tab_order="38">
<field value="string"/>
</scriptable_edit>
</cell>
<cell size="5"/>
<cell size="22"> <button id="btn_book_select" tab_order="39">
<text>#btn_book_select</text>
</button> </cell>
- Replace this code with the following:
<cell size="22">
<stack layout="horz">
<cell>
<scriptable_edit id="book_of_business" tab_order="238">
<field value="string"/>
</scriptable_edit>
</cell>
<cell size="5"/>
<cell size="22"> <button id="btn_book_select" tab_order="239">
<text>#btn_book_select</text>
</button> </cell>
- Locate the following code:
<cell size="16">
<stack layout="horz">
<cell size="95">
<static id="0x20046" tab_order="51"> <text>#head_opportunities</text> </static>
</cell>
- Replace this code with the following:
<cell size="16">
<stack layout="horz">
<cell size="95">
<static id="0x20046" tab_order="251"> <text>#head_opportunities</text> </static>
</cell>
- Locate the following code:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="opportunities_view" tab_order="52">
<source type="auto" name="OpportunityJointContact"/>
<view id="opportunities:mvg"/>
<restriction>
- Replace this code with the following:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="opportunities_view" tab_order="252">
<source type="auto" name="OpportunityJointContact"/>
<view id="opportunities:mvg"/>
<restriction>
- Locate the following code:
<cell size="22" attraction="far">
<stack layout="horz" spacing="5" padding="5">
<cell size="160" attraction="far"> <button id="btn_delete_opportunity" tab_order="54" image="button_image:Remove:16" align="left">
<text>#lbl_remove_opportunity</text>
</button> </cell>
<cell size="160" attraction="far"> <button id="btn_mvgOpportunity" tab_order="53" image="type_image:Opportunity:16" align="left">
<text>#lbl_new_opportunity</text>
</button> </cell>
- Replace this code with the following:
<cell size="22" attraction="far">
<stack layout="horz" spacing="5" padding="5">
<cell size="160" attraction="far"> <button id="btn_delete_opportunity" tab_order="254" image="button_image:Remove:16" align="left">
<text>#lbl_remove_opportunity</text>
</button> </cell>
<cell size="160" attraction="far"> <button id="btn_mvgOpportunity" tab_order="253" image="type_image:Opportunity:16" align="left">
<text>#lbl_new_opportunity</text>
</button> </cell>
- Locate the following code:
<cell size="16">
<stack layout="horz">
<cell size="110">
<static id="head_leads" tab_order="55"> <text>#head_leads</text> </static>
</cell>
- Replace this code with the following:
<cell size="16">
<stack layout="horz">
<cell size="110">
<static id="head_leads" tab_order="255"> <text>#head_leads</text> </static>
</cell>
- Locate the following code:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="leads_view" tab_order="56">
<source type="auto" name="Lead"/>
<view id="leads:form_view"/>
<restriction>
- Replace this code with the following:
<cell>
<stack layout="horz" padding="5">
<cell>
<data_view id="leads_view" tab_order="256">
<source type="auto" name="Lead"/>
<view id="leads:form_view"/>
<restriction>
- Locate the following code:
<cell size="21" attraction="far">
<stack layout="horz" spacing="5" padding="5">
<cell size="160" attraction="far"> <button id="btn_delete_lead" tab_order="58" image="button_image:Remove:16" align="left">
<text>#lbl_delete_lead</text>
</button> </cell>
<cell size="160" attraction="far"> <button id="btn_new_lead" tab_order="57" image="type_image:Lead:16" align="left">
<text>#lbl_new_lead</text>
</button> </cell>
- Replace this code with the following:
<cell size="21" attraction="far">
<stack layout="horz" spacing="5" padding="5">
<cell size="160" attraction="far"> <button id="btn_delete_lead" tab_order="258" image="button_image:Remove:16" align="left">
<text>#lbl_delete_lead</text>
</button> </cell>
<cell size="160" attraction="far"> <button id="btn_new_lead" tab_order="257" image="type_image:Lead:16" align="left">
<text>#lbl_new_lead</text>
</button> </cell>
- Locate the following code:
<control id="lbl Job title" window_id="0x11a3"/> </cell>
<cell>
<control id="lbl Company" window_id="0x11a2"/> </cell>
<cell>
<control id="edit Company" window_id="0x1181"/> </cell>
<cell>
<control id="Image" window_id="0x1108"/> </cell>
<cell>
- Replace this code with the following:
<control id="lbl Job title" window_id="0x11a3"/> </cell>
<cell>
<control id="Image" window_id="0x1108"/> </cell>
<cell>
- Locate the following code:
<stack layout="vert" padding="0" spacing="0">
<cell>
<combobox id="priority" tab_order="9">
<items format=":[:(Label):]" value_column="Value" has_null_item="false">
<source type="auto" name="ActivityPriorityPicklist"/>
<order_by>
<order ascend="true">SortOrder</order>
- Replace this code with the following:
<stack layout="vert" padding="0" spacing="0">
<cell>
<combobox id="priority" tab_order="9">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ActivityPriorityPicklist"/>
<order_by>
<order ascend="true">SortOrder</order>
- Locate the following code:
</cell>
<cell size="21">
<combobox id="Type" tab_order="25">
<items format=":[:(Label):]" value_column="Value" has_null_item="false">
<source type="auto" name="ActivityTypePicklist"/>
<order_by>
<order ascend="true">SortOrder</order>
- Replace this code with the following:
</cell>
<cell size="21">
<combobox id="Type" tab_order="25">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ActivityTypePicklist"/>
<order_by>
<order ascend="true">SortOrder</order>
- Locate the following code:
</cell>
<cell size="21">
<combobox id="Type" tab_order="25">
<items format=":[:(Label):]" value_column="Value" has_null_item="false">
<source type="auto" name="ActivityTypePicklist"/>
<order_by>
<order ascend="true">SortOrder</order>
- Replace this code with the following:
</cell>
<cell size="21">
<combobox id="Type" tab_order="25">
<items format=":[:(Label):]" value_column="Value" has_null_item="true">
<source type="auto" name="ActivityTypePicklist"/>
<order_by>
<order ascend="true">SortOrder</order>