-
ChatterFeed
-
12Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
95Replies
Not able to Save and Deploy the application using standalone Force.com IDE
Hi,
I am not able to Save and Deploy the application using Standalone Force.com IDE , it is giving me an error like
'Synchronized Check Failed'
Can you please guide how to resolve this error.
Thanks
-
- Rajashri
- July 04, 2012
- Like
- 0
- Continue reading or reply
Invalid bind expression error
Save error: Invalid bind expression type of SOBJECT:AggregateResult for Id field of SObject Contact
List<contact> cnt = new List<Contact>([select id, name, from contact where contact.id =: [select max(id) from contact]]);
-
- Suresh Raghuram
- January 23, 2012
- Like
- 0
- Continue reading or reply
How would I go about searching for a particular Person Account that has a matching email address?
Apex Documentation shows this when selecting for 'person account' objects:
SELECT Name, SobjectType, IsPersonType FROM RecordType WHERE SobjectType='Account' AND IsPersonType=True
A) I don't know where to go from there (adding 'and email=joe@blow.com' throws an error)
B) if I used this method it would seem to be a two step process...there must be a more efficient 'select' statement to accomplish this in one step?
-
- jfitz1959
- January 10, 2012
- Like
- 0
- Continue reading or reply
Trigger that creates an object record - Pass "Name" details
Hi,
I have written a trigger to creates a record for a custom obj "Line_del__c" after a Lead is inserted.
The only thing I can not get the Name of the Lead to pass over to "Line_del__c" Name field. It keeps passing an id like "a0OV000000078Mg"
Can not work it out!! Can anyone help please?
trigger InsertNewMonitorLine on Lead (after insert) {
List<Lead> lam = new List<Lead>();
for(Lead a: trigger.new){
// insert a custom object
Line_del__c obj = new Line_del__c();
obj.Name = a.Name;
obj.Team_s_Dept_s_del__c = 'a0PV0000000EhlM';
obj.ME1__c = '00530000004WakH';
obj.Linked_NB__c = a.Id;
obj.DTR3__c = System.Today();
insert obj;
insert lam;
}
}
-
- LAMCORP
- January 10, 2012
- Like
- 0
- Continue reading or reply
Autonumber field in test class giving null
Hi,
I have a class in which I am updating a field for a custom object.For this class i have written a test class.In this test class i was creating new record for my custom object.
The problem is for this custom object,Name field is an Autonumber field.
So in my test class after inserting i was trying to send this Name to my Apex class.But surprisingly it is giving me NULL after insert in Test class.
Kindly let me know if this is a Salesforce defect.
Thanks,
Eswar.
-
- eswarsf
- January 07, 2012
- Like
- 0
- Continue reading or reply
Call SOAP
Hi
I need to call Soap, from my apex class, to fetch data and show in my VF page. How should i go about it.
I have got this sample SOAP request/response code from my vendor. I need to use mes:subscriberId and mes:scheduleId to get Data.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mes="http://XXXXX.net/ws/schemas/messages">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="XWSSGID-1261544568770-474929336" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>############</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">###########</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<mes:GetCheckImageRequest>
<!--You may enter the following 4 items in any order-->
<mes:subscriberId>XXXXXX</mes:subscriberId>
<!--Optional:-->
<mes:scheduleId>XXXXXXX</mes:scheduleId>
</mes:GetCheckImageRequest>
</soapenv:Body>
</soapenv:Envelope>
Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header ver:CPIIDA-BUILD="build-30676" ver:CPIIDA-BUILD-TIME="03-01-2012 06:01" ver:CPIISRV-BUILD="build-30693" ver:CPIISRV-BUILD-TIME="03-01-2012 06:04" ver:CPIIWSRV-BUILD="build-30489" ver:CPIIWSRV-BUILD-TIME="03-01-2012 06:09" xmlns:ver="http://XXXXX.net/ws/schemas/header/version"/>
<SOAP-ENV:Body>
<ns3:GetCheckImageResponse xmlns:ns3="http://XXXXX.net/ws/scmas/mages" xmlns:ns2="http://XXXXX.net/ws/schemas/types">
<ns3:subscriberId>XXXXXXX</ns3:subscriberId>
<ns3:scheduleId>XXXXXXX</ns3:scheduleId>
<ns3:transactionId>XXXXXXX</ns3:transactionId>
<ns3:externalReferenceId>XXXXXXX</ns3:externalReferenceId>
<ns3:checkImageFront>SUkqAAgAXXXX</ns3:checkImageFront>
<ns3:checkImageBack xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<ns3:commandStatus>1</ns3:commandStatus>
<ns3:errorMessage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ns3:GetCheckImageResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I am completely lost on how to do this, any kind of help will be appreciated.
Thanks
Sid
-
- Sidharth
- January 05, 2012
- Like
- 0
- Continue reading or reply
Test Class for a custom convert class
I have a class that is used for converting a Lead. I need to write a test class for this but I can't seem to get it. Please help. Here's the class:
Public Class CustomLeadCont
{
string pr;
private final lead l;
public CustomLeadCont(ApexPages.StandardController stdController) {
this.l = (Lead)stdController.getRecord();
}
public PageReference autoRun() {
String theId = ApexPages.currentPage().getParameters().get('id');
if (theId == null) {
// Display the Visualforce page's content if no Id is passed over
return null;
}
for (Lead l:[select id, name, Checkbox_1__c, Checkbox_2__c from Lead where id =:theId])
{
If (l.Checkbox_1__c & l.Checkbox_2__c)
{
Database.LeadConvert lc = new database.LeadConvert();
lc.setLeadId(l.id);
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);
Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());
pr = lcr.getAccountId();
}
else{
pr = l.id;}
}
PageReference pageRef = new PageReference('/' + pr);
pageRef.setRedirect(true);
return pageRef;
}
}
----------------------------------------------------------------------------------------
Here's the Test Class:
@isTest
public class TestController{
static testMethod void TestControler()
{
Lead myLead = new Lead(LastName = 'Test', Company='Test Company', Checkbox_1__c = true, Checkbox_2__c=true);
insert myLead;
Apexpages.StandardController stdController = new Apexpages.StandardController(myLead);
CustomLeadCont cl= new CustomLeadCont(stdController);
cl.autoRun();
}
}
-
- BakT
- January 05, 2012
- Like
- 0
- Continue reading or reply
Help with basic SOQL query
I'm having a problem finding the right syntax for a pretty simple SOQL query.
So i have a basic query
Select Time_Clock__r.Team_Member_Employee__c FROM Time_Record__c where Id='xxxx'
which will return the Contact Id. Now I need to get the User associated with that contact. I've tried
SELECT Id from User where ContactId in (Select Time_Clock__r.Team_Member_Employee__c FROM Time_Record__c where Id='a0D3000000CiPAk')
and
SELECT Id from User where ContactId = (Select Time_Clock__r.Team_Member_Employee__c FROM Time_Record__c where Id='a0D3000000CiPAk')
I can't seem to find the correct syntax to achieve this. I'd appreciate any help.
-
- Eli Flores, SFDC Dev
- January 03, 2012
- Like
- 0
- Continue reading or reply
Test Class for After Update Trigger
Here is the Trigger
*****************************************
trigger AfterUpdateAssociatePeople on Associate__c (after update) {
Set<Id> assocIdSet = new Set<Id>();
Map<Id, Associate__c> assocMap = new Map<Id, Associate__c>();
List<Associate__c> assocList = [Select Id, Name, Current_Address__c, Current_City__c,Current_State__c,Current_Zip__c,from Associate__c where ID IN: assocIdSet];
for(Associate__c assoc: Trigger.new) {
assocIdSet.add(assoc.Id);
assocMap.put(assoc.Id, assoc);
}
List<People__c> peopleList =[Select Address_1__c,CID__c,Associate__c,City__c,State__c,Zip__c FROM People__c WHERE Associate__c IN: assocIdSet];
if(peopleList != null && peopleList.size() > 0) {
for(People__c people: peopleList) {
Associate__c assoc = assocMap.get(people.Associate__c);
people.Address_1__c = assoc.Current_Address__c;
people.City__c = assoc.Current_City__c;
people.State__c=assoc.Current_State__c;
people.Zip__c=assoc.Current_Zip__c;
people.CID__c=assoc.Associate_ID__c;
}
}
update peopleList;
}
I wrote a Test Class and when i run the test it s not showing my trigger or its code coverage
****************************************************************************************
@isTest
private class AfterUpdateAssociatePeopleTest{
public static testMethod void AfterUpdateAssociatePeopleStaticTestMethod()
{
Associate__c aa =new Associate__c(Name='TestAss' ,Associate_ID__c='ASSID' ,First_Name__c='AssFName', Current_Address__c='TestAddress',Current_City__c='TestCity',Current_Zip__c='45678',Current_State__c='TX');
insert aa;
List<People__c> peopleList = new List<People__c>{new people__c(
Name='TestUser',Associate__c=aa.id,CID__c='ASSID',Address_1__c='3445street',City__c='',State__c='XX',Zip__c='75423', )};
insert peopleList;
List<People__c> peopleList1 = new List<People__c>{ [select id from People__c where id in :peopleList]};
for(People__c ppdd:peopleList1)
ppdd.Address_1__c = aa.Current_Address__c;
update peopleList1;
}
}
******************************************
-
- steve456
- December 19, 2011
- Like
- 0
- Continue reading or reply
Help with Test class
HI,
Below is the class and test class. It fine in UAT and gives no errors but iam not able to deploy it into production as it gives error as System.LimitException:Too many Query locator rows:10001
global class Visibility_Batch_BankAccount implements Database.Batchable<sObject> , Database.Stateful {
String query;
private Visibility_Utility vu;
global Database.QueryLocator start(Database.BatchableContext BC){
vu = new Visibility_Utility();
Visibility_Batch_Base vbb = new Visibility_Batch_Base('Bank_Account__c');
List<Integration_Info__c> intInfoList = [Select Last_Run_Time__c, Previous_Last_Run_Time__c from Integration_Info__c limit 1];
DateTime lastRunTime = intInfoList[0].Last_Run_Time__c;
DateTime PreviousLastRunTime = intInfoList[0].Previous_Last_Run_Time__c;
query = vbb.getQueryString();
return database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List<sObject> scope){
vu.createShare('Bank_Account__c',scope);
}
global void finish(Database.BatchableContext BC){
}
}
and the test class is
@isTest
private class Visibility_Batch_BankAccount_Test{
static testMethod void Visibility_Batch_BankAccountTest(){
Visibility_Batch_BankAccount visBctBnkAcc = new Visibility_Batch_BankAccount();
Integration_Info__c ii = new Integration_Info__c();
ii.Previous_Last_Run_Time__c = System.Now().addMinutes(-1);
ii.Last_Run_Time__c = system.Now();
insert ii;
Bank_Account__c testBnkAcc = new Bank_Account__c(Name='testName');
List<Bank_Account__c> lstBnkAcc = new List<Bank_Account__c>();
lstBnkAcc.add(testBnkAcc);
insert lstBnkAcc;
Test.startTest();
visBctBnkAcc.start(null);
visBctBnkAcc.execute(null,lstBnkAcc);
visBctBnkAcc.finish(null);
Test.stopTest();
}
}
Thanks
-
- devforce_111
- December 09, 2011
- Like
- 0
- Continue reading or reply
Tricky Issue
I have two objects
Object 1
Object 2
Object 1 has a field "Field1"
Object 2 has a field "Field2"
Object 1 has a field "CommonField" which is a lookup from Object2
Field2 is a formula referring to a "Field3" in "Object 3"
Field1 is a picklist
When "CommonField" of Object1 is changed
Field1 should have a value corresponding to the Field2 value
Any approach how to write the trigger for it
-
- steve456
- December 07, 2011
- Like
- 0
- Continue reading or reply
501 Advanced Developer Certification Assignment - 5 Key Points
Finally got around to writing a blog post with 5 handy hints for those tackling the Advanced Developer Certification assignment — this doesn't cover the first exam, but aims to highlight a few things you should expect when doing the assignment and final exam.
Hope it's of use to some of you guys!
-
- MattLacey.ax1065
- June 28, 2012
- Like
- 0
- Continue reading or reply
New Blog Post: Coding on Force.com — What Do You Need to Know?
Hey Guys,
For those new to the platform and eager to start cutting code, I've written a blog post explaining some of the pre-requisites, hope some folks find it useful.
-
- MattLacey.ax1065
- June 01, 2012
- Like
- 0
- Continue reading or reply
Run Territory Assignment from Apex?
As the subject states, is there a way to trigger territory assignment from apex? Have posted a question on stack overflow too for completeness, will cross-post the solution if there is one!
-
- MattLacey.ax1065
- January 19, 2012
- Like
- 0
- Continue reading or reply
OAuth Error using Mobile SDK for iOS
For an existing iPhone application which used old-school logins (i.e. required a token and stored user creds) I added OAuth support last week using code from the Mobile SDK preview.
It's been working perfectly until today, when I've had errors several times regarding failed JSON parsing when processing the response of a refresh request (see below). What's odd is that the JSON is perfectly valid according to jsonlint.com so I'm assuming there's a problem with the parsing that's happening in SFOAuthCoordinator. Anybody have any ideas of how to resolve this? It's preventing my from continuing with my development! (I know the SDK is a preview release but surely login shouldn't need to change?).
oauthCoordinator:didFailWithError: Error Domain=SFOAuthErrorDomain Code=668 "SFOAuthErrorDomain malformed_response : failed to parse response JSON" UserInfo=0x760d700 {error=malformed_response, NSLocalizedDescription=SFOAuthErrorDomain malformed_response : failed to parse response JSON, error_description=failed to parse response JSON, response_data={"id":"https://test.salesforce.com/id/00DO00000005SlNMAU/00590000000NZvLAAW","issued_at":"1320726727749","instance_url":"https://cs5.salesforce.com","signature":"bapfKpkvacGgWSEddD+buphb2W3Y2Rwaq40FBIrbERE=","access_token":"00DO00000005SlN!AR8AQLQofWLSElsO0xcyc4bnIdMe.vmoFz_Ua237NMtdEWO6KMgZW2rdNTEKsERFy3Df2Lxe1Cmh.QcWJ2jDHAtVaReXjDZI"}, NSUnderlyingError=0x760aa60 "SFOAuthErrorDomain malformed_response : failed to parse response JSON"}
-
- MattLacey.ax1065
- November 08, 2011
- Like
- 0
- Continue reading or reply
Uploading images to Rich text area field using Dataloader
Hi All,
Is it possible to upload images to a Rich text area field using Apex data loader ?
Regards,
Lakshmi.
- laks
- October 09, 2012
- Like
- 0
- Continue reading or reply
Not able to Save and Deploy the application using standalone Force.com IDE
Hi,
I am not able to Save and Deploy the application using Standalone Force.com IDE , it is giving me an error like
'Synchronized Check Failed'
Can you please guide how to resolve this error.
Thanks
- Rajashri
- July 04, 2012
- Like
- 0
- Continue reading or reply
Hi All ! Selected Radio button value not stored in field. thanks in advance
The user selected value not stored in object field value.myfield is a field of the customobject
Vf page:
<div class="options">
<apex:selectRadio value="{!custom.myfield}" required="true" layout="pageDirection">
<apex:selectOptions value="{!myOptions}" />
</apex:selectRadio>
</div>
Class:
public customobject__c custom{get; set;}
Thanks in advance..
- john.kr
- July 04, 2012
- Like
- 0
- Continue reading or reply
Unable to see the selected options of drop down
Hi,
I have visualforce page which uses custom settings as select list and when I select few of the names then those needs to be displayed.
I have shown the select opions but I am not able to see the selected values in the output. (ie., after the message "You have chose" I am not getting any output.
CODE
--------
a) controller class
public class customsettingcontroller {
public string[] ISOSelected {get;set;}
public PageReference test() {
return null;
}
public list<SelectOption> getISOCodes() {
List <SelectOption> listCodes = new List<SelectOption>();
for (Country_Code__c cCode : Country_Code__c.getAll().values())
listCodes.add(new selectoption(cCode.ISO_Code__c, cCode.Name+'--'+cCode.ISO_Code__c));
return listCodes;
}
}
b) visualforce page
<apex:page controller="customsettingcontroller">
<apex:form >
<apex:pageBlock title="Country Codes">
<apex:selectList value="{!ISOSelected}" multiselect="true">
<apex:selectOptions value="{!ISOCodes}"></apex:selectOptions>
</apex:selectList>
<apex:actionSupport event="onselect" action="{!test}" rerender="output" status="status"/>
</apex:pageBlock>
</apex:form>
<apex:outputPanel id="output">
<apex:actionStatus id="status" startText="testing...">
<apex:facet name="stop">
<apex:outputPanel >
You have chose:
<apex:dataList value="{!ISOSelected}" var="a">{!a}</apex:dataList>
</apex:outputPanel>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:page>
Please help me on this.
Thanks,
JBabu.
- JBabu
- April 18, 2012
- Like
- 0
- Continue reading or reply
- steve456
- February 07, 2012
- Like
- 0
- Continue reading or reply
Unable to run install.sh libsbjson-ios.a not being built
I downloaded the latest version of the Mobile SDK today and ran ./install.sh but am getting build errors specifically with the json library. The git commands seemed to work correctly and located all the libraries. I have tried ./reset.sh and ./install.sh again with no change. Here is the area that's failing: (Note: all of the configurations for json lib fail the same way)
pre:
dependency.oauth.check:
iOSShared.dependency.oauth:
dependency.sbjson.check:
iOSShared.dependency.sbjson:
dependency.sbjson.compile:
initArtifacts:
[echo] artifacts.dir is '/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/artifacts'
pre:
build:
compileDebug:
iOSShared.compile:
[echo] installing SBJson for SDK iphoneos
[exec] Build settings from command line:
[exec] INSTALL_ROOT = /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/artifacts/SBJson
[exec] SDKROOT = iphoneos5.0
[exec]
[exec] === BUILD NATIVE TARGET sbjson-ios OF PROJECT SBJson WITH CONFIGURATION Debug ===
[exec] Check dependencies
[exec]
[exec] SetOwnerAndGroup "chrisn5555:staff" /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
[exec] cd /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/json-framework
[exec] setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/chrisn5555/Downloads/eclipse/plugins/org.jruby_1.2.0.9419p1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
[exec] /usr/sbin/chown -RH "chrisn5555:staff" /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
[exec]
[exec] SetMode u+w,go-w,a+rX /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
[exec] cd /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/json-framework
[exec] setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/chrisn5555/Downloads/eclipse/plugins/org.jruby_1.2.0.9419p1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
[exec] /bin/chmod -RH u+w,go-w,a+rX /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
[exec]
[exec]
[exec] ** BUILD SUCCEEDED **
[exec]
BUILD FAILED
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/shared/build.xml:214: The following error occurred while executing this line:
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/shared/build.xml:222: The following error occurred while executing this line:
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/build.xml:40: The following error occurred while executing this line:
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/build.xml:58: Warning: Could not find file /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/json-framework/build/UninstalledProducts/libsbjson-ios.a to copy.
- chrisn5555
- February 03, 2012
- Like
- 0
- Continue reading or reply
System.QueryException: Non-selective query against large object type (more than 100000 rows).
I am getting this error System.QueryException: Non-selective query against large object type (more than 100000 rows). only in production
Here is the query in my trigger.
list<Contact> con = new list<Contact>([Select c.Phone, c.EmpID__c, c.Id, c.Email From Contact c where c.EmpID__c!=null and c.EmpID__c =: trigger.new[0].ID__c limit 1])
Thanks
- kkr.dev
- January 24, 2012
- Like
- 0
- Continue reading or reply
Invalid bind expression error
Save error: Invalid bind expression type of SOBJECT:AggregateResult for Id field of SObject Contact
List<contact> cnt = new List<Contact>([select id, name, from contact where contact.id =: [select max(id) from contact]]);
- Suresh Raghuram
- January 23, 2012
- Like
- 0
- Continue reading or reply
too many callouts: 11 and cannot bulkify callouts
Dear Apex friends,
Is there anyway to get around the "too many callouts: 11" problem when I cannot bulkify my callouts?
TIA
D
- DHO_604
- January 23, 2012
- Like
- 0
- Continue reading or reply
Apex heap size too large: 5218807
I am facing this issue.Can anybody help me out?
"
Update error code CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: ReconcileOrder: execution of BeforeUpdate caused by: System.Exception: Apex heap size too large: 5218807
"
- steve456
- January 23, 2012
- Like
- 0
- Continue reading or reply
execute schedule
Hi,
I like to execute my schedule (sche01), every 10 minutes;
how to plan it?
thanks.
M.H
- hmoh1920
- January 23, 2012
- Like
- 0
- Continue reading or reply
Run Territory Assignment from Apex?
As the subject states, is there a way to trigger territory assignment from apex? Have posted a question on stack overflow too for completeness, will cross-post the solution if there is one!
- MattLacey.ax1065
- January 19, 2012
- Like
- 0
- Continue reading or reply
apex:actionFunction seems not to rerender
In my component I use actionfunction and rerender
<apex:component controller="MultiSelectBoxController"> ... <apex:panelGrid columns="4"> ... <apex:actionFunction name="moveDown" action="{!moveDown}" reRender="selectedRight"/> ... <apex:selectList id="selectedRight" required="false" value="{!selectedRight}" multiselect="true" size="20" style="width:250px"> <apex:selectOptions value="{!rightOptions}"/> </apex:selectList> <apex:panelGroup layout="block" style="text-align: center; padding:10px;"> Up<br/> <a href="javascript:moveUp();" style="text-decoration:none"> <img src="/s.gif" alt="Move Up" class="upArrowIcon" title="Move Up"/> </a><br/> ... </apex:panelGroup> </apex:panelGrid> </apex:component>
By debuging I am sure that my action method is called correctly
public class MultiSelectBoxController { ... public PageReference moveDown() { // For each selected item right for(Integer r=0; r<selectedRight.size(); r++) { // Iterate over right list for(Integer pos=rightOptions.size()-2; pos >=0; pos--) { // When select item is found if(rightOptions[pos].getValue() == selectedRight[r]) { // Save item above SelectOption tmp = rightOptions[pos+1]; // Switch options with item above rightOptions[pos+1] = rightOptions[pos]; rightOptions[pos] = tmp; } } } return null; } }
Even in Firebug I can see the AJAX POST request coming from the rerender. But on the page nothing happens although the rightOptions have changed...
After an hour of trial and error I hand this over to someone whos smarter than me....
Robert
- rsoesemann
- January 18, 2012
- Like
- 0
- Continue reading or reply
Extended formula in Apex(lookup list)
Hi,
We ran into an issue where SF can't store more than xxx chars and bytes in the formula. We have a huge lookup list which crucial part of our lead management system..
It's just a simple thing we need:
If County+State=ChicagoIL, then CountyID=6666
Else if County+State=NapervilleIL, then CountyID=7777
.....
So We have this formula:
CASE(TRIM(UPPER(County__c))+TRIM(UPPER(MailingState)),
"ALEUTIAN ISLANDSAK","12732",
"ALEUTIANS EASTAK","11844",
"ALEUTIANS WESTAK","9854",
"ANCHORAGEAK","12044",
"BETHELAK","12186",
"BRISTOL BAYAK","12435",
"DENALIAK","10720",
"DILLINGHAMAK","10099",
"FAIRBANKS NORTH STARAK","10403",
"HAINESAK","10576",
"JUNEAUAK","10489",
"KENAI PENINSULAAK","12265",
.................
"WESTONWY","10987","")
which 3,000 lines long and somehow we need to implement this as an apex trigger(since SF can't handle big formulas).
What would be the best way to accomplosh this? Maybe someone has an example of how it should work as a apex trigger?
Any help is appreciated.
Thanks
- Ted Officer
- January 10, 2012
- Like
- 0
- Continue reading or reply