-
ChatterFeed
-
2Best Answers
-
0Likes Received
-
0Likes Given
-
24Questions
-
35Replies
SOQL Exception
Scenario : When New contact added with custom field Conference (Lookup to conference Obj), expected attendee fiels update by one on conference obj.
Triiger :
trigger ConferenceNumberUpdateTrigger on Contact (before insert, before update) { list <contact> con = trigger.new; ConfNumberClass.updateConf(con); }
Class:
public class ConfNumberClass{ public static void updateConf(list<contact> con){ for(contact c : con){ if(true){ conference__c c1 = [select Expected_Attendes__c from conference__C where id=:c.conference__r.id limit 1]; c1.Expected_Attendes__c = c1.Expected_Attendes__c + 1; update c1; } } }
Exception:
|EXCEPTION_THROWN|[9]|System.QueryException: List has no rows for assignment to SObject 08:57:45.165 (165430000)|METHOD_EXIT|[5]|01pF0000002bU1H|ConfNumberClass.updateConf(LIST<Contact>) 08:57:45.165 (165736000)|FATAL_ERROR|System.QueryException: List has no rows for assignment to SObject
Appreciate your help.
Dhairya
- Dhairya
- January 02, 2012
- Like
- 0
- Continue reading or reply
Java Script remoting
Marry Christmas Group!!!
I would like to use JS function on a cusotm link on a custom object. Developed below code for VF page
<apex:page controller="JSDetail"> <script type="text/javascript"> var name1="{!$CurrentPage.parameters.id}"; JSDetail.getDetail(name1,function(result,event){ alert(result.Expected_Attendes__c); alert(result.name); },{escape:true} ); </script> </apex:page>
and here is controller code
public with sharing class JSDetail { public static conference__c account; @RemoteAction public static conference__c getDetail(String iden){ account = [select name, Expected_Attendes__c from conference__c where id = :iden]; return account; } }
Now i created cutom link but not able to connect VF page with that link. Not sure why?
Appreciate your help
- Dhairya
- December 26, 2011
- Like
- 0
- Continue reading or reply
Recoed Owner Change
Hi,
In our application we are populationg one custom object from the webstore using api. Hence, all inserted records have same record owner but for the reporting purpose i need Account Owner name as the custome object owner name. We have two common fields.
How to resolve the issue?
Appreciate your help.
Thanks,
Dhairya
- Dhairya
- June 17, 2011
- Like
- 0
- Continue reading or reply
Which Report to Use?
Hi,
We need below report format
AccountName state License Key Date check see total
------------------- ------- -------------- ------ --------- ------ --------
Accc ca xxxxxx 10-1-2010 20 12 32
11-13-2010 14 14 28
1-3-2011 10 5 15
Total 44 31 75
I tried summary report but failed to figure it out how to add date values.
Appreciate your response.
d
- Dhairya
- April 22, 2011
- Like
- 0
- Continue reading or reply
Forecast Category
I have question with forecast category i need different name for few of the forecast category when we click forecast tab.
But i don't know how to do that?
Appriciate your reply.
Thanks,
Dhairya
- Dhairya
- April 11, 2011
- Like
- 0
- Continue reading or reply
Controller Method
Hi,
I have to custom obj (1) Project (2) Budget with lookup relationship (1 Proj can have multiple budgets)
One VF page with stdcontroller budget__c and extension accepting value for month and budget value.
Command Button {!addMore}.
Here i wrote a class method
- Dhairya
- March 08, 2011
- Like
- 0
- Continue reading or reply
Apex after Insert Trigger
Hi,
Here i would likek to update test1__c value with related objects fields. But it didn't work at all.
- Dhairya
- March 04, 2011
- Like
- 0
- Continue reading or reply
Apex method with update
Appreciate Your Help,
Dhairya
- Dhairya
- March 03, 2011
- Like
- 0
- Continue reading or reply
VF Page + Extension
Hi,
The scenario i have is as below.
I have three Custom Obj named Project related Custom Object Budget. Third Custom Object is Period which consist Date Field and
few formula fields which comes up with CFY and CFYQ1,2,3/4.
So here i design a VF Page which accept two fields (1) Period (Lookup to Period Custom Obj) (2) Value (Currency)
I would like to calculate Total Budget for the Project. But i don't know how to write achieve this,
<apex:page standardController="Budget__c" showheader="true" extensions="BudgetDetailController"><apex:form > <apex:pageBlock title="{!Budget__c.pmo_project__r.name}" mode="edit"> <apex:pageBlockButtons > <apex:commandButton action="{!addMore}" value="Add More" reRender="in , out"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Budget Entry Page" columns="2"> <apex:inputField value="{!Budget__c.Period__c}"/> <apex:inputField value="{!Budget__c.Value__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <!-- Ajax call for Budget Entry Page --> <apex:pageBlock id="out" title="Monthly Read View"> <apex:dataTable value="{!myBudgets}" var="aBudget" width="100%" > <apex:column > <apex:facet name="header"><b>Name</b></apex:facet> {!aBudget.Name} </apex:column> <apex:column > <apex:facet name="header"><b>Period</b></apex:facet> {!aBudget.Period__r.Month_Info__c} </apex:column> <apex:column > <apex:facet name="header"><b>Value</b></apex:facet> {!aBudget.Value__c} </apex:column> <apex:column > <apex:facet name="header"><b>Quater Information</b></apex:facet> {!aBudget.period__r.Quarter_Info__c} </apex:column> </apex:dataTable> </apex:pageBlock> <apex:pageBlock id="in" title="Quaterly Read View"> <apex:dataTable value="{!myBudgetsquaters}" var="aBudget" width="100%" > <apex:column > <apex:facet name="header"><b>Year</b></apex:facet> {!total} </apex:column> </apex:dataTable> </apex:pageBlock> </apex:page>
- Dhairya
- March 02, 2011
- Like
- 0
- Continue reading or reply
Trigger Question
Hi,
For a particular product we do not want that sales rep. change unitprice and quantity. I wrote this trigger but its throwing me an error.
- Dhairya
- January 29, 2011
- Like
- 0
- Continue reading or reply
WEB Service API
I would like to learn webservice API.
What are the resources and order in which i have to pursue?
Appreciate your response.
- Dhairya
- January 19, 2011
- Like
- 0
- Continue reading or reply
Eclipse .log Error
Hi,
When i double click eclipse then it throw an error i.e. see .log file (C:\user\mother\workspace\metadata\.log)
Appreciate your help.
Thanks,
Dhairya
- Dhairya
- December 18, 2010
- Like
- 0
- Continue reading or reply
Task Based Trigger
Hi,
A scenario is i am receiving values like below in text field at opp. line level for 7 products
Qty 7 (2010-11-14) or Qty 5 (2010-11-14) Qty 2 (2010-11-14) or Qty 4 (2010-11-14) Qty 2 (2010-11-14) Qty 1(2010-11-14)
[ number of receiving date are vary so i am not sure that we can use workflow or not ]
So, i wrote a trigger for that :
caused by: System.ListException: List index out of bounds: 3
Trigger.OppotunityProductFulfillmentDateTrigger: line 21, column 14
- Dhairya
- December 09, 2010
- Like
- 0
- Continue reading or reply
Time Dependent Trigger
Hi,
The scenario is we are capturing fulfillment date at Opp. product level. [which is coming from ERP]
i.e. Qty 1(05-DEC-2010) Qty 4(08-DEC-2010) this is a text field (fulfillment_date__c) in SFDC
Now, based on this field value i want to fire task on 12/05/2010 and 12/08/2010 to a specific user.
Appreciate your help.
Dhairya
- Dhairya
- December 08, 2010
- Like
- 0
- Continue reading or reply
Time Based Workflow Rule
Hi,
The scenario is we are capturing fulfillment date at Opp. product level. [which is coming from ERP]
i.e. Qty 1(05-DEC-2010) Qty 4(08-DEC-2010) this is a text field (fulfillment_date__c) in SFDC
Now, based on this field date workflow rule fire on that date and assign a task.
Appreciate your help.
Dhairya
- Dhairya
- December 08, 2010
- Like
- 0
- Continue reading or reply
Deployment error
Hi,
I am trying to deploy new custom object named Complaint_Management from Sand Box to Production.
Facing Error :
Appreciate your response.
Thanks,
Dhairya
- Dhairya
- December 05, 2010
- Like
- 0
- Continue reading or reply
Workflow deployment error
Hi,
I have one workflow rule set up in sandbox and that cause VF page email alert to user.
(1) Succesfuly delpoy VF page under communication tempalate
(2) Create new Force.com project which only consist that WFR component
(3) When Deploying that WFR in production using deploy to server ask for test trigger coverage and code coverage etc.
While i am just deploying simple WFR.
This is my first deployment experience. Appreciate your response.
Thanks
- Dhairya
- December 03, 2010
- Like
- 0
- Continue reading or reply
Trigger which Create New account from Case
Hi,
The scenario is :
(1) Case contains few custom field, and if that field value is not present as an account name then create account using that name.
They do not want to go with lookup idea. They want trigger.
The Code i tried to write is :
But it throw an error.
Appreciate your response.
Thanks,
Dhairya
- Dhairya
- November 29, 2010
- Like
- 0
- Continue reading or reply
Trigger.new
I am new to apex development. I wrote few triggers without using trigger.new variable and they worked fine.
Can anyone explain what is the importance of Trigger.new and its mandatory to use trigger.new?
Thanks
- Dhairya
- November 27, 2010
- Like
- 0
- Continue reading or reply
Lookup "New Button"
Hi,
I have a Lookup relation ship between one custom object field End_User__c and Account.
So, when we click magnify glass and do not find appropriate account then we click "New" button and create a new account.
But the situation is i need more fields out there and make some of the fields as required.
How can i do that?
I appreciate your response.
Thanks,
Dhairya
- Dhairya
- November 23, 2010
- Like
- 0
- Continue reading or reply
Report results
Hi All,
I am trying to generate a report based on the value of a checkbox. It is a tabular report that has to count total number of records where the check box value is true. In my system, there are about 40 records with the check box value "true". However, when I run the report I can see only one record. Is it because of the security? I can see all the records in the object. I created new record with the checkbox value as "true", but it is not displaying that record in the results. Could any one please let me know what I need to verify to get all the records ? Your help is greatly appreciated.
- Assh
- August 23, 2011
- Like
- 0
- Continue reading or reply
Data Export does not include formulas
Just venting, but I discovered that the csv files generated by the Salesforce.com Data Export do not include Formula fields, they are left out entirely. But if I use the Data Loader or Informatica, the formula fields are exported. I'm trying to work with the Data Export csv files and it is frustrating to have to keep two sets of copybooks, one with formulas and one without.
- Rich23
- August 12, 2011
- Like
- 0
- Continue reading or reply
- SFDC Student
- August 12, 2011
- Like
- 0
- Continue reading or reply
Recoed Owner Change
Hi,
In our application we are populationg one custom object from the webstore using api. Hence, all inserted records have same record owner but for the reporting purpose i need Account Owner name as the custome object owner name. We have two common fields.
How to resolve the issue?
Appreciate your help.
Thanks,
Dhairya
- Dhairya
- June 17, 2011
- Like
- 0
- Continue reading or reply
Which Report to Use?
Hi,
We need below report format
AccountName state License Key Date check see total
------------------- ------- -------------- ------ --------- ------ --------
Accc ca xxxxxx 10-1-2010 20 12 32
11-13-2010 14 14 28
1-3-2011 10 5 15
Total 44 31 75
I tried summary report but failed to figure it out how to add date values.
Appreciate your response.
d
- Dhairya
- April 22, 2011
- Like
- 0
- Continue reading or reply
Apex after Insert Trigger
Hi,
Here i would likek to update test1__c value with related objects fields. But it didn't work at all.
- Dhairya
- March 04, 2011
- Like
- 0
- Continue reading or reply
Apex method with update
Appreciate Your Help,
Dhairya
- Dhairya
- March 03, 2011
- Like
- 0
- Continue reading or reply
Task Based Trigger
Hi,
A scenario is i am receiving values like below in text field at opp. line level for 7 products
Qty 7 (2010-11-14) or Qty 5 (2010-11-14) Qty 2 (2010-11-14) or Qty 4 (2010-11-14) Qty 2 (2010-11-14) Qty 1(2010-11-14)
[ number of receiving date are vary so i am not sure that we can use workflow or not ]
So, i wrote a trigger for that :
caused by: System.ListException: List index out of bounds: 3
Trigger.OppotunityProductFulfillmentDateTrigger: line 21, column 14
- Dhairya
- December 09, 2010
- Like
- 0
- Continue reading or reply
Time Dependent Trigger
Hi,
The scenario is we are capturing fulfillment date at Opp. product level. [which is coming from ERP]
i.e. Qty 1(05-DEC-2010) Qty 4(08-DEC-2010) this is a text field (fulfillment_date__c) in SFDC
Now, based on this field value i want to fire task on 12/05/2010 and 12/08/2010 to a specific user.
Appreciate your help.
Dhairya
- Dhairya
- December 08, 2010
- Like
- 0
- Continue reading or reply
Time Based Workflow Rule
Hi,
The scenario is we are capturing fulfillment date at Opp. product level. [which is coming from ERP]
i.e. Qty 1(05-DEC-2010) Qty 4(08-DEC-2010) this is a text field (fulfillment_date__c) in SFDC
Now, based on this field date workflow rule fire on that date and assign a task.
Appreciate your help.
Dhairya
- Dhairya
- December 08, 2010
- Like
- 0
- Continue reading or reply
Deployment error
Hi,
I am trying to deploy new custom object named Complaint_Management from Sand Box to Production.
Facing Error :
Appreciate your response.
Thanks,
Dhairya
- Dhairya
- December 05, 2010
- Like
- 0
- Continue reading or reply
Workflow deployment error
Hi,
I have one workflow rule set up in sandbox and that cause VF page email alert to user.
(1) Succesfuly delpoy VF page under communication tempalate
(2) Create new Force.com project which only consist that WFR component
(3) When Deploying that WFR in production using deploy to server ask for test trigger coverage and code coverage etc.
While i am just deploying simple WFR.
This is my first deployment experience. Appreciate your response.
Thanks
- Dhairya
- December 03, 2010
- Like
- 0
- Continue reading or reply
Data Loader Question
I have a question, with Data Loader can we map custom fields to standard fields?
- sravu
- December 02, 2010
- Like
- 0
- Continue reading or reply
Force.com IDE installer crashed in forceide.exe
I am trying to install IDE (force.com-ide-installer-win32.exe). First I had some trouble with the proxy settings in pulse explorer. I manage to overcome this. Then the installer stops with an error in forceide.exe:
JVM terminated. Exit code=-1
-Dfile.encoding=UTF-8
-Xms256m
-Xmx1024m
-XX:PermSize=128M
-XX:MaxPermSize=512M
-Djava.class.path=C:\Programme\salesforce.com\Force.com IDE\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-os win32
-ws win32
-arch x86
-showsplash
-launcher C:\Programme\salesforce.com\Force.com IDE\forceide.exe
-name Forceide
--launcher.library C:\Programme\salesforce.com\Force.com
IDE\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup C:\Programme\salesforce.com\Force.com IDE\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-install C:\Programme\salesforce.com\Force.com IDE
-configuration C:\Programme\salesforce.com\Force.com IDE\configuration
-clean
-vm C:/Programme/Java/jre6/bin\client\jvm.dll
-vmargs
-Dfile.encoding=UTF-8
-Xms256m
-Xmx1024m
-XX:PermSize=128M
-XX:MaxPermSize=512M
-Djava.class.path=C:\Programme\salesforce.com\Force.com IDE\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
Any idea how to fix it?
Thanks in advance.
- waterkant
- November 30, 2010
- Like
- 0
- Continue reading or reply
Trigger which Create New account from Case
Hi,
The scenario is :
(1) Case contains few custom field, and if that field value is not present as an account name then create account using that name.
They do not want to go with lookup idea. They want trigger.
The Code i tried to write is :
But it throw an error.
Appreciate your response.
Thanks,
Dhairya
- Dhairya
- November 29, 2010
- Like
- 0
- Continue reading or reply