1

我必须在 Picklist 中显示许多值,并且在一定限度内它可以工作。但是,当我分配给它时它达到一定的限制时会引发错误。所以请帮帮我,我怎样才能设法在 Picklist 中存储更多值?

公式如下:

CASE( Name, 
"Virgin Australia",HYPERLINK("http://www.virginaustralia.com/Personal/Bookings/Managebookings/index.htm","Virgin Australia"),
"Virgin Atlantic",HYPERLINK("https://www.virgin-atlantic.com/en/us/manageyourflights/updatebooking/index.jsp","Virgin Atlantic"),
"Virgin America",HYPERLINK("http://www.virginamerica.com/view-itinerary.html","Virgin Australia"),
"US AIR",HYPERLINK("http://reservations.usairways.com/Default.aspx","Virgin America"),
"United Airlines",HYPERLINK("http://www.united.com/page/genericpage/0,,52172,00.html?navSource=dropDown&linkTitle=itineraries","United Airlines"),
"Turkish Air",HYPERLINK("http://www4.thy.com/mybookings/reservations.tk?target=view&lang=en","Turkish Air"),
"Turkish Air",HYPERLINK("http://www.thaiair.com/AWR_PREM/view-trip.jsp","Turkish Air"),
"Swiss Airlines",HYPERLINK("http://www.swiss.com/web/EN/Pages/index.aspx?Country=US","Swiss Airlines"),
"Southwest Airlines",HYPERLINK("https://www.southwest.com/flight/lookup-air-reservation.html?int=GSUBNAV-AIR-RETRIEVE&forceNe...","Southwest Airlines"),
"South African",HYPERLINK("https://www.flysaa.com/Journeys/reservation/searchpnr.action?nameSpace=reservation","South African"),
"Singapore Airlines",HYPERLINK("https://www.singaporeair.com/manageBooking-flow.form?execution=e1s1","Singapore Airlines"),
"QATAR AIRWAYS",HYPERLINK("http://www.qatarairways.com/us/en/homepage.page","QATAR AIRWAYS"),
"Qantas Airlines",HYPERLINK("http://www.qantas.com.au/travel/airlines/your-booking/global/en","Qantas Airlines"),
"Malaysia",HYPERLINK("https://book.malaysiaairlines.com/itd/itd/lang/en/reservations","Malaysia"),
"Lufthansa",HYPERLINK("http://www.lufthansa.com/online/portal/lh/us/my_account/my_bookings","Lufthansa"),
"KLM - Royal Dutch Airlines",HYPERLINK("http://www.klm.com/travel/us_en/index.htm#tab=db_mmb","KLM - Royal Dutch Airlines"),
"Japan Air",HYPERLINK("http://www.5971.jal.co.jp/eng/SearchReservation.do","Japan Air"),
"Etihad Airlines",HYPERLINK("http://www.etihadairways.com/sites/etihad/_layouts/etihad/obe/RetrieveBooking.aspx","Etihad Airlines"),
"Emirates",HYPERLINK("https://fly.emirates.com/MYB/MMBLogin.aspx","Emirates"),
"Delta Airlines",HYPERLINK("http://www.delta.com/","Delta Airlines"),
"Copa Airlines",HYPERLINK("http://www.copaair.com/sites/US/EN/Pages/homepage.aspx","Copa Airlines"),
"Continental Airlines",HYPERLINK("http://www.continental.com/web/en-US/apps/reservation/default.aspx","Continental Airlines"),
"")

获取错误:编译的公式太大而无法执行(5,171 个字符)。最大大小为 5,000 个字符

4

4 回答 4

2

你可以通过几种方式解决这个问题。

我首选的方法是使用工作流字段更新。您可以将案例陈述拆分为单独的工作流程,并使用正确的链接更新字段。这样,您就可以将公式计算拆分为几个工作流程。

例子:

Workflow A:
If "Virgin Atlantic" OR "Virgin Atlantic" OR...
THEN Update the field

Workflow B:
If "Swiss Airlines" OR "Southwest Airlines" OR...
THEN Update the field

等等....

于 2012-04-06T16:20:05.940 回答
1

在这个尺寸下,您正在进入代码区。这是 Apex 和 Visualforce 的时候了,即使您可能不想处理代码管理。不知道您的目标环境是什么,很难说最佳解决方案是什么。例如,如果您正在编写一个向他人销售的应用程序,或者如果您只是配置自己公司的 Salesforce 组织以满足您的需求 - 它会改变方法。

如果您不想管理整个 Visualforce 页面来处理所有详细信息字段和相关列表,请考虑使用仅包含您需要的字段的纤薄内联 VF 页面(如上面提到的大量选项列表)。

例如:

顶尖

public List<SelectOption> customList
{
   get
   {
      List<SelectOption> retVal = new List<SelectOption>();

      retVal.add(new SelectOption('value1', 'Label 1'));
      retVal.add(new SelectOption('value2', 'Label 2'));
      retVal.add(new SelectOption('value3', 'Label 3'));
      // ...            

      return retVal;
   }
   private set;
}

视觉力量

<apex:selectList size="1" value="{!controller.theSelection}">
   <apex:selectOptions value="{!customList}"/>
</apex:selectList>
于 2012-04-07T18:19:03.473 回答
0

+1 视觉力。另一种方法可能是使用字段依赖项为用户拆分选项。但在这种情况下,它听起来并不适用于你,因为你正在触及代码墙——而不是“选项”墙。

您可以像这样设置字段依赖项。控制字段 = AZ,家属是与该字母相关联的航空公司

于 2012-04-10T17:15:59.057 回答
0

另一种解决方案可能是使用 AppExchange 应用程序,ProvenWorks 的 AddressTools 提供超过 3,000 个州选择列表值,而 Salesforce 州和国家/地区选择列表提供 336 个。除此之外,它是完全可定制的并且适用于自定义对象。

有关更多信息,请查看列表:https ://appexchange.salesforce.com/listingDetail?listingId=a0N30000002zt9uEAA

希望这可以帮助。

于 2013-11-15T14:52:09.160 回答