-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
16Questions
-
12Replies
System.AsyncException:Future method cannot be called from a future or batch method
Is System.AsyncException (Future method cannot be called from a future or batch method) apply to appexchnage partner program?
We have installed an AppExchange which is a managed package and also we have our own code (batch apex). Whenever we run the batch job; the future callout in the managed package is error out a System.AsyncException.
The managed package code snippet are:
Trigger:
trigger <triggername> on opportunity (before update){
//checking condition
If(Check__c == true);
//collect the info and call future method
Classname.updatemethod(data);
}
Class:
Public with sharing class classname{
@future (callout=true)
public static void updatemethod(Sring data) {
//send data to external system
}
We running a batch job daily on opportunity and updating the check__c field based on some condition.
So basically, if the batch job update the check__c = true then the trigger in managed package fire and collect the info and send to the external system by future callout.
Please refer the error message below:
Update failed. First exception on row 0 with id 0066000000Qzl22AAB; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, triggername: execution of BeforeUpdate caused by: System.AsyncException: Future method cannot be called from a future or batch method: Classname.updatemethod(data);
How do we resolve this kind of issues between client’s batch job and appExchange’s future callout during an update operation.
Thanks and regards
Govinda
- kgrasu
- October 08, 2014
- Like
- 0
- Continue reading or reply
Independent Salesforce.com consultant - GreenCard Holder- available immediately- Bay Area-CA
Hi,
I am an experienced Salesforce.com independent administrator/developer for implementing solutions on the force.com platform.
My expertise is in the following areas:
- Gather business requirements and convert to technical solutions
- Take initiative in implementing solutions on the force.com platform
- Custom development using Apex classes, triggers and Visualforce
- Configuring and customizing Customer and Partner Portals (PRM)
- Automating business processes using triggers, workflows, Email Services and Outbound Messaging
- Creating rich user interfaces using visualforce pages
- Installing applications from AppExchange and customizing them
- Performing Quality Assurance (regressing, functionality and performance testing) of applications before deployment to production environments
- Entire end-to-end administrative functionalities on the force.com platform
- Data analysis and data migration between systems using Data Loader tools and Apex Explorer
- Creating custom reports and dashboards and complex reporting
- Development expertise using Apex and Visualforce
- Deployment strategies and processes using the force.com Migration tools
- Provide 24X7 production support and accountability for resolving support related issues
Skill set: Apex triggers and classes, Visualforce, SControls, Web Services, SOQL, SOSL, Oracle SQL, PLSQL, HTML, Javascript, Access, Excel and its data cleansing functions
Rates: negotiable
Current Location: Fremont, California
Please contact me at 510-209-3152 or send me an email at govindarasuk@yahoo.com if you need more information.
Thank you
Govindarasu
- kgrasu
- October 30, 2009
- Like
- 0
- Continue reading or reply
Independent Salesforce.com consultant - GreenCard Holder- available immediately- Bay Area-CA
Hi,
I am an experienced Salesforce.com independent administrator/developer for implementing solutions on the force.com platform.
My expertise is in the following areas:
- Gather business requirements and convert to technical solutions
- Take initiative in implementing solutions on the force.com platform
- Custom development using Apex classes, triggers and Visualforce
- Configuring and customizing Customer and Partner Portals (PRM)
- Automating business processes using triggers, workflows, Email Services and Outbound Messaging
- Creating rich user interfaces using visualforce pages
- Installing applications from AppExchange and customizing them
- Performing Quality Assurance (regressing, functionality and performance testing) of applications
before deployment to production environments
- Entire end-to-end administrative functionalities on the force.com platform
- Data analysis and data migration between systems using Data Loader tools and Apex Explorer
- Creating custom reports and dashboards and complex reporting
- Development expertise using Apex and Visualforce
- Deployment strategies and processes using the force.com Migration tools
- Provide 24X7 production support and accountability for resolving support related issues
Skill set: Apex triggers and classes, Visualforce, SControls, Web Services, SOQL, SOSL, Oracle SQL, PLSQL, HTML, Javascript, Access, Excel and its data cleansing functions
Rates: negotiable
Current Location: Fremont, California
Please contact me at 510-209-3152 or send me an email at govindarasuk@yahoo.com if you need more information.
Thank you
Govindarasu
- kgrasu
- August 08, 2009
- Like
- 0
- Continue reading or reply
How can we pass a javascript value to a VF controller method without user interaction
- kgrasu
- December 17, 2008
- Like
- 0
- Continue reading or reply
Can I use email templates for custom objects, from a trigger or apex class?
We need to use salesforce email templates from a trigger or Apex class. The template has most of the merge fields from a custom object named "Assignment__c" and the email needs to be sent to the custom email field in another custom object named "Contractor__c".
Is this possible using the following code snippet? We tried it but was throwing exception saying that it supports only standard objects by Users, Lead and Contacts.
mail.setTemplateId(templateId);
mail.setTargetObjectId ('01I700000002M9A');
mail.setWhatId(AssignmentId);
Any help or guidelines with some sample code on how this can be done will be greatly appreciated. Thanks and let me know if you need any other information.
- kgrasu
- November 20, 2008
- Like
- 0
- Continue reading or reply
Why is my visualforce page not saving information from custom fields?
<apex:page controller="conTaskNew">
<apex:form >
<apex:pageBlock id="mypageblock" title="Task Edit" mode="new">
<apex:pageBlockButtons >
<apex:commandButton onclick="return lsave()" action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Task Information" columns="2" id="theSection">
<apex:inputField id="vDisposition" value="{!task.Disposition__c}"/>
<apex:inputField id="vActDate" value="{!task.ActivityDate}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
public class conTaskNew {
private Task taskobj;
private String vleadid;
private String vOwner;
private String vemail;
private String vwholead;
private String vwhatid;
private String vdisposition;
private String vactionbynewten;
private Date vactivitydate;
private String vsubject;
private String vdesc;
private String vstatus;
String vid;
public conTaskNew(){
this.vleadid = ApexPages.currentPage().getParameters().get('lid');
this.vOwner= ApexPages.currentPage().getParameters().get('assignedTo');
}
public String getOwner(){
return this.vOwner;
}
public void setOwner(String pown){
this.vOwner = pown;
}
public Task getTask() {
return taskobj;
}
public void setTask(Task taskdet) {
taskobj = taskdet;
}
public String getWhoId(){
return this.vwholead;
}
public void setWhoId(String pwholead){
this.vwholead = pwholead;
}
public String getWhatId(){
return this.vwhatid;
}
public void setWhatId(String pwhatid){
this.vwhatid = pwhatid;
}
public String getDisposition(){
return this.vdisposition;
}
public void setDisposition(String pdisposition){
this.vdisposition = pdisposition;
}
public Date getActivityDate(){
return this.vactivitydate;
}
public void setActivityDate(Date pactivitydate){
this.vactivitydate = pactivitydate;
}
public PageReference save() {
Lead leadrec=[Select ownerid from Lead where Id=:this.vleadid];
this.vOwner = leadrec.Ownerid;
Task newtask= new Task(
Subject=this.vsubject,
WhoId= this.vleadid,
Ownerid= this.vOwner,
disposition__c= this.vdisposition,
activityDate= this.vactivitydate
);
try{
insert newtask;
}catch(Exception e){
throw e;
}
PageReference secondPage = new PageReference('/'+vleadid);
secondPage.setRedirect(true);
return secondPage;
}
}
- kgrasu
- September 05, 2008
- Like
- 0
- Continue reading or reply
How can I add the "Send Notification Email" checkbox to my task visualforce page?
- kgrasu
- September 05, 2008
- Like
- 0
- Continue reading or reply
Why can't I add the Assiged To field in Task to my visualforce page?
I am trying to override the edit page for "Log a Call" or task with a custom visualforce page. I am having trouble getting some of the fields like
When I add the following for the Assigned To, it throws the error "Assigned To ID: owner cannot be blank". Basiaclly I want to display the Assigned To field as it appears in the standard Log a Call edit page. Is there some reference available somewhere for converting all these fields in the standard page into a VF page?
<apex:page standardController="Task" extensions="conTaskNew">
<apex:form >
<apex:pageBlock id="mypageblock" title="Task Edit" mode="new">
<apex:pageBlockButtons >
<apex:commandButton onclick="return lsave()" action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Task Information" columns="2" id="theSection">
<apex:inputField id="vOwner" value="{!task.OwnerId}"/>
<apex:inputField id="vActDate" value="{!task.ActivityDate}"/>
<apex:inputField id="vsubject" value="{!task.Subject}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Appreciate all your valuable feedbacks.
- kgrasu
- September 05, 2008
- Like
- 0
- Continue reading or reply
Why is my visualforce page not saving information from custom fields?
<apex:page controller="conTaskNew"> <apex:form > <apex:pageBlock id="mypageblock" title="Task Edit" mode="new"> <apex:pageBlockButtons > <apex:commandButton onclick="return lsave()" action="{!save}" value="Save"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Task Information" columns="2" id="theSection"> <apex:inputField id="vDisposition" value="{!task.Disposition__c}"/> <apex:inputField id="vActDate" value="{!task.ActivityDate}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
public class conTaskNew { private Task taskobj; private String vleadid; private String vOwner; private String vemail; private String vwholead; private String vwhatid; private String vdisposition; private String vactionbynewten; private Date vactivitydate; private String vsubject; private String vdesc; private String vstatus; String vid; public conTaskNew(){ this.vleadid = ApexPages.currentPage().getParameters().get('lid'); this.vOwner= ApexPages.currentPage().getParameters().get('assignedTo'); } public String getOwner(){ return this.vOwner; } public void setOwner(String pown){ this.vOwner = pown; } public Task getTask() { return taskobj; } public void setTask(Task taskdet) { taskobj = taskdet; } public String getWhoId(){ return this.vwholead; } public void setWhoId(String pwholead){ this.vwholead = pwholead; } public String getWhatId(){ return this.vwhatid; } public void setWhatId(String pwhatid){ this.vwhatid = pwhatid; } public String getDisposition(){ return this.vdisposition; } public void setDisposition(String pdisposition){ this.vdisposition = pdisposition; } public Date getActivityDate(){ return this.vactivitydate; } public void setActivityDate(Date pactivitydate){ this.vactivitydate = pactivitydate; } public PageReference save() { Lead leadrec=[Select ownerid from Lead where Id=:this.vleadid]; this.vOwner = leadrec.Ownerid; Task newtask= new Task( Subject=this.vsubject, WhoId= this.vleadid, Ownerid= this.vOwner, disposition__c= this.vdisposition, activityDate= this.vactivitydate ); try{ insert newtask; }catch(Exception e){ throw e; } PageReference secondPage = new PageReference('/'+vleadid); secondPage.setRedirect(true); return secondPage; } }
Message Edited by kgrasu on 09-05-2008 11:20 AM
- kgrasu
- September 05, 2008
- Like
- 0
- Continue reading or reply
How can I add the "Send Notification Email" checkbox to my task visualforce page?
- kgrasu
- September 04, 2008
- Like
- 0
- Continue reading or reply
Why can't I add the Assiged To field in Task to my visualforce page?
I am trying to override the edit page for "Log a Call" or task with a custom visualforce page. I am having trouble getting some of the fields like
When I add the following for the Assigned To, it throws the error "Assigned To ID: owner cannot be blank". Basiaclly I want to display the Assigned To field as it appears in the standard Log a Call edit page. Is there some reference available somewhere for converting all these fields in the standard page into a VF page?
<apex:page standardController="Task" extensions="conTaskNew"> <apex:form > <apex:pageBlock id="mypageblock" title="Task Edit" mode="new"> <apex:pageBlockButtons > <apex:commandButton onclick="return lsave()" action="{!save}" value="Save"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Task Information" columns="2" id="theSection"> <apex:inputField id="vOwner" value="{!task.OwnerId}"/> <apex:inputField id="vActDate" value="{!task.ActivityDate}"/> <apex:inputField id="vsubject" value="{!task.Subject}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Appreciate all your valuable feedbacks.
- kgrasu
- September 04, 2008
- Like
- 0
- Continue reading or reply
Why am I unable to retrieve the value of Apex:param in my controller?
This is my part VF code:
<apex:page controller="conLeadTab" action="{!validate}"> <apex:pageBlock id="mypageblock" mode="new"> <apex:param id="vesg" name="vesg" value=""/> </apex:pageBlock> <script language="javascript"> var vesgval = 'SOme value'; //The line below does not work, but here I need to assign the value of vesgval to the parameter vesg //{!$CurrentPage.parameters.vesg}=vesgval; </script> </apex:page>
public PageReference validate() { this.pesgval = System.currentPageReference().getParameters().get('vesg'); System.debug('this.pesgval--->>>'+this.pesgval); if(pesgval==null || pesgval.length()==0){ PageReference secondPage1 = new PageReference('/apex/editLeadError'); secondPage1.setRedirect(true); return secondPage1; } else{//do something else, but the execution never comes here as the value of pesgval is always NULL} return null; }
The system.debug in the controller for this.pesgval always return null and the value is not fetched from the VF page.
All that I am struggling to achieve here is:
1. Creating a parameter (not query string) in the VF page
2. Assigning a value to it within javascript on pageload
3. Retrieving the parameter value from the controller
Rasu
- kgrasu
- August 28, 2008
- Like
- 0
- Continue reading or reply
Why can't I deploy my triggers to prod. that has 95% test coverage?
System.QueryException: List has no rows for assignment to SObject Class.AccountScheduler.getLocation: line 84, column 25 Class.AccountScheduler.createNew: line 700, column 19 Trigger.TgrAssignmentDupCheck: line 22, column 24 20080805070410.845:Class.AccountScheduler.testAccountScheduler: line 1113, column 5: Insert failed. First exception on row 0;
first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, TgrAssignmentDupCheck: execution of BeforeInsert caused by: System.QueryException: List has no rows for assignment to SObject Class.AccountScheduler.getLocation: line 84, column 25 Class.AccountScheduler.createNew: line 700, column 19 Trigger.TgrAssignmentDupCheck: line 22, column 24 System.Exception: Assertion Failed Class.AccountScheduler.testAccountScheduler: line 1114, column 5 *** Ending Test AccountScheduler.static testMethod void testAccountScheduler()
Two of the apex triggers has a dependency on two of the apex classes as it invokes a method from those two classes.
I have successfully deployed the apex classes to production, but I need help to figure out how I can deploy the triggers to production which currently throws the abovesaid error.
Appreciate all your feedback on this.
Thanks and regards,Rasu
- kgrasu
- August 05, 2008
- Like
- 0
- Continue reading or reply
Issue with time-based workflow and lead conversion
We have created a time based workflow (to trigger say 2 days before scheduled date, a custom datetime field). After activating this workflow, we are not able to convert leads to accounts and the system throws the following error message in the convert lead page:
“Error: Unable to convert lead that is in use by workflow"
Is there a way to fix this issue as we need to convert the leads even if the workflow has not been triggerd for a particular lead.
Appreciate all your response.
Thanks
- kgrasu
- July 22, 2008
- Like
- 0
- Continue reading or reply
Can we capture the windows login "username" into salesforce.com ?
- kgrasu
- July 22, 2008
- Like
- 0
- Continue reading or reply
Can SalesForce.com do a search on a Customer Identifier automatically?
Can we have SalesForce.com do a search on the Customer Identifier automatically?
Can we do this with SalesForce?
The dailer is AVAYA.
- kgrasu
- July 14, 2008
- Like
- 0
- Continue reading or reply
Lightning Components Basics - Connect to Salesforce with Server-Side Controllers
I have a problem with the challenge, my App work fine but I don´t pass the challenge. This is my code:
campingList.cmp:
<aura:component controller="CampingListController"> <ltng:require styles="/resource/SLDS105/assets/styles/salesforce-lightning-design-system-ltng.css"/> <aura:handler name="init" action="{!c.doInit}" value="{!this}"/> <aura:attribute name="newItem" type="Camping_Item__c" default="{ 'sobjectType': 'Camping_Item__c', 'Price__c': 0, 'Quantity__c': 0}"/> <div class="slds-card slds-p-top--medium"> <ui:inputText aura:id="campname" label="Camping Name" value="{!v.newItem.Name}" required="true"/> <ui:inputCheckbox aura:id="packed" label="Packed?" value="{!v.newItem.Packed__c}"/> <ui:inputCurrency aura:id="price" label="Price" value="{!v.newItem.Price__c}" required="true"/> <ui:inputNumber aura:id="quantity" label="Quantity" value="{!v.newItem.Quantity__c}" required="true"/> <ui:button label="Create Camping" press="{!c.clickCreateCamping}"/> </div> <aura:attribute name="items" type="Camping_Item__c[]"/> <div class="slds-card slds-p-top--medium"> <header class="slds-card__header"> <h3 class="slds-text-heading--small">Campings</h3> </header> <section class="slds-card__body"> <div id="list" class="row"> <aura:iteration items="{!v.items}" var="item"> <c:campingListItem item="{!item}"/> </aura:iteration> </div> </section> </div> </aura:component>
campingListController.js:
({ // Load expenses from Salesforce doInit: function(component, event, helper) { // Create the action var action = component.get("c.getItems"); // Add callback behavior for when response is received action.setCallback(this, function(response) { var state = response.getState(); if (component.isValid() && state === "SUCCESS") { component.set("v.items", response.getReturnValue()); } else { console.log("Failed with state: " + state); } }); // Send action off to be executed $A.enqueueAction(action); }, clickCreateCamping: function(component, event, helper) { if(helper.validateCampingForm(component)){ // Create the new expense var newCamping = component.get("v.newItem"); helper.createItem(component, newCamping); } } })campingListHelper.js
({ createItem: function(component, camping) { var action = component.get("c.saveItem"); action.setParams({ "item": camping }); action.setCallback(this, function(response){ var state = response.getState(); if (component.isValid() && state === "SUCCESS") { var campings = component.get("v.items"); campings.push(response.getReturnValue()); component.set("v.items", campings); } }); $A.enqueueAction(action); }, validateCampingForm: function(component) { var validQuantity = true; var validPrice = true; var nameField = component.find("campname"); var campname = nameField.get("v.value"); var quantityField = component.find("quantity"); var quantity = quantityField.get("v.value"); var priceField = component.find("price"); var price = priceField.get("v.value"); if ($A.util.isEmpty(campname) || $A.util.isEmpty(quantity) || $A.util.isEmpty(price)){ validQuantity = false; validPrice = false; nameField.set("v.errors", [{message:"Camping name, quantity or price can't be blank."}]); } else { nameField.set("v.errors", null); } return(validQuantity && validPrice); } })CampingListController.apxc:
public with sharing class CampingListController { @AuraEnabled public static List<Camping_Item__c> getItems() { // Check to make sure all fields are accessible to this user String[] fieldsToCheck = new String[] { 'Id', 'Name', 'Packed__c', 'Price__c', 'Quantity__c' }; Map<String,Schema.SObjectField> fieldDescribeTokens = Schema.SObjectType.Camping_Item__c.fields.getMap(); for(String field : fieldsToCheck) { if( ! fieldDescribeTokens.get(field).getDescribe().isAccessible()) { throw new System.NoAccessException(); return null; } } // Perform isAccessible() checking first, then return [SELECT Id, Name, Packed__c, Price__c, Quantity__c FROM Camping_Item__c]; } @AuraEnabled public static Camping_Item__c saveItem(Camping_Item__c item) { // Perform isUpdatable() checking first, then upsert item; return item; } }I am still getting this error:
Challenge Not yet complete... here's what's wrong:
The campingList JavaScript helper isn't saving the new record to the database or adding it to the 'items' value provider.
My App save the new record into the database and add it to the "items" list.
Thanks for your answers!
- Manuel Casas
- June 13, 2016
- Like
- 6
- Continue reading or reply
Why is my custom button javascript code not working in sandbox?
Appreciate is anyone can help identify the cause for this. This is my js code for the custom button:
{!requireScript("/soap/ajax/11.1/connection.js")} try{ var userid = '{!User.Id}'; var username='{!User.Name}'; var userEmail='{!User.Email}'; var apprId='{!Fixture_Order__c.Approver_Name__c}'; var fixOrder='{!Fixture_Order__c.Id }'; var vtoemailid='BHN.fixtures@bhnetwork.com'; var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:2,ptoEmailid:vtoemailid,pisruntest:false}; var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args); if(vCardKitsNeeded==1){ var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:3,ptoEmailid:vtoemailid,pisruntest:false}; var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args); } if(vMerchReq==1){ var args = {puser:userid,pusername:username,puseremail:userEmail,pfixorderno:fixOrder,papprId:apprId,pemailtype:4,ptoEmailid:vtoemailid,pisruntest:false}; var result = sforce.apex.execute('HandlerFOSendEmail' , 'sendMail', args); } alert("The fixture order has been sent to BHN Fixtures."); }catch(e) { alert("Send Email has failed. Please contact your system administrator with this screeshot or error message: "+e + "-" + e.message); }
- arasu
- September 04, 2008
- Like
- 0
- Continue reading or reply
Why can't I add the Assiged To field in Task to my visualforce page?
I am trying to override the edit page for "Log a Call" or task with a custom visualforce page. I am having trouble getting some of the fields like
When I add the following for the Assigned To, it throws the error "Assigned To ID: owner cannot be blank". Basiaclly I want to display the Assigned To field as it appears in the standard Log a Call edit page. Is there some reference available somewhere for converting all these fields in the standard page into a VF page?
<apex:page standardController="Task" extensions="conTaskNew"> <apex:form > <apex:pageBlock id="mypageblock" title="Task Edit" mode="new"> <apex:pageBlockButtons > <apex:commandButton onclick="return lsave()" action="{!save}" value="Save"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Task Information" columns="2" id="theSection"> <apex:inputField id="vOwner" value="{!task.OwnerId}"/> <apex:inputField id="vActDate" value="{!task.ActivityDate}"/> <apex:inputField id="vsubject" value="{!task.Subject}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Appreciate all your valuable feedbacks.
- kgrasu
- September 04, 2008
- Like
- 0
- Continue reading or reply
Why am I unable to retrieve the value of Apex:param in my controller?
This is my part VF code:
<apex:page controller="conLeadTab" action="{!validate}"> <apex:pageBlock id="mypageblock" mode="new"> <apex:param id="vesg" name="vesg" value=""/> </apex:pageBlock> <script language="javascript"> var vesgval = 'SOme value'; //The line below does not work, but here I need to assign the value of vesgval to the parameter vesg //{!$CurrentPage.parameters.vesg}=vesgval; </script> </apex:page>
public PageReference validate() { this.pesgval = System.currentPageReference().getParameters().get('vesg'); System.debug('this.pesgval--->>>'+this.pesgval); if(pesgval==null || pesgval.length()==0){ PageReference secondPage1 = new PageReference('/apex/editLeadError'); secondPage1.setRedirect(true); return secondPage1; } else{//do something else, but the execution never comes here as the value of pesgval is always NULL} return null; }
The system.debug in the controller for this.pesgval always return null and the value is not fetched from the VF page.
All that I am struggling to achieve here is:
1. Creating a parameter (not query string) in the VF page
2. Assigning a value to it within javascript on pageload
3. Retrieving the parameter value from the controller
Rasu
- kgrasu
- August 28, 2008
- Like
- 0
- Continue reading or reply
Visual Force Auto Complete Component ;)
The purpose of the component is to enable autocomplete in lookup fields. I used the autocomplete js created by Jim Roos:
(http://www.jimroos.com/2007/05/ajax-autocomplete.html) but made some modifications to it so that it could interact with an Apex controller among some other things...
So my idea was that if you were making a VF page that had an inputfield that was related to a lookupfield you would just insert this autocomplete component to that inputfield. Something like this:
<apex:inputField value="{!Contact.accountid}" id="accname" styleClass="cField">
<c:autocomplete ObjectName="Accounts" InputId="{!$Component.accname}" AutoCompleteId="accACid" ClassName="autocomplete300"/>
</apex:inputField>
The component has 4 parameters:
The name of the object or custom object that the inputfield relates to (new objects must be added inside the apex classes since i had some problems constructing a dynamic query).
The InputId which is used to relate the component to the input field
The id for the Component
A classname parameter that basically just defines the width of the suggestions menu.
Here's a screenshot of how it looks like in action:
Here's a link to the file containing the required files:
AutoCompleteComponent
Message Edited by jonathan rico on 08-16-2008 01:55 PM
Message Edited by jonathan rico on 08-17-2008 09:04 AM
- jonathanrico.
- August 16, 2008
- Like
- 0
- Continue reading or reply
Why can't I deploy my triggers to prod. that has 95% test coverage?
System.QueryException: List has no rows for assignment to SObject Class.AccountScheduler.getLocation: line 84, column 25 Class.AccountScheduler.createNew: line 700, column 19 Trigger.TgrAssignmentDupCheck: line 22, column 24 20080805070410.845:Class.AccountScheduler.testAccountScheduler: line 1113, column 5: Insert failed. First exception on row 0;
first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, TgrAssignmentDupCheck: execution of BeforeInsert caused by: System.QueryException: List has no rows for assignment to SObject Class.AccountScheduler.getLocation: line 84, column 25 Class.AccountScheduler.createNew: line 700, column 19 Trigger.TgrAssignmentDupCheck: line 22, column 24 System.Exception: Assertion Failed Class.AccountScheduler.testAccountScheduler: line 1114, column 5 *** Ending Test AccountScheduler.static testMethod void testAccountScheduler()
Two of the apex triggers has a dependency on two of the apex classes as it invokes a method from those two classes.
I have successfully deployed the apex classes to production, but I need help to figure out how I can deploy the triggers to production which currently throws the abovesaid error.
Appreciate all your feedback on this.
Thanks and regards,Rasu
- kgrasu
- August 05, 2008
- Like
- 0
- Continue reading or reply
Can we capture the windows login "username" into salesforce.com ?
- kgrasu
- July 22, 2008
- Like
- 0
- Continue reading or reply
over write the client account tab
So, Can we over write the client account tab, so that sys admin’s see the standard page, other users see the visualforce page? If so how?
Any help?
Thanks!
- lopezc
- July 15, 2008
- Like
- 0
- Continue reading or reply
Can SalesForce.com do a search on a Customer Identifier automatically?
Can we have SalesForce.com do a search on the Customer Identifier automatically?
Can we do this with SalesForce?
The dailer is AVAYA.
- kgrasu
- July 14, 2008
- Like
- 0
- Continue reading or reply