• Dhairya
  • NEWBIE
  • 60 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 35
    Replies

 

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

 

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

 

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

     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   

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

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 

 

 

public PageReference addMore() {
     
    database.Insert(budget1);
// Would like to Rollup sum of all budgetvalue related to the project but test1__c never get updated.
    if(budget1.Value__c!=Null && budget1.PMO_Project__r.test1__C!=Null)
               budget1.PMO_Project__r.test1__c=budget1.PMO_Project__r.test1__c + budget1.Value__c;
    
    ApexPages.StandardController budgetController = new ApexPages.StandardController(budget1);
    return budgetController.save();
    //return page.budgetDetail;
}
I need accumulated budget value at Project level.
Appreciate your help.
Thanks,
Dhairya

 

Hi,

 

   Here i would likek to update test1__c value with related objects fields. But it didn't work at all.

 

 

 

trigger budTotalTrigger on Budget__c (after insert) {
   list <projects__c> projects = [select id,name,test1__C from Projects__C];
   
   for(budget__C bud : trigger.new)
   {
     for(projects__c pro : projects) 
     {
       if(pro.id == bud.PMO_Project__r.id)
       {
        pro.test1__c = pro.test1__C + bud.value__c;
      
       }
      database.update(pro);
    
     }
     
        
  
   }
}

 

 

 

Hi,
    {!addMore} is a coomand button action (VF) and blow code is a part of exdtension. I am getting current record  in variable named budget1 of type Budget__C. 
    I would like to calculate total budget value at project level on field test1__c on Project__C object.
    Question is creation of budget record working fine but budger related project field (test1__c) is not populated.
//Budget Record Save
     public PageReference addMore()
     {
                       
          
          database.Insert(budget1);
         if(budget1.value__c!=Null && budget1.PMO_Project__r.test1__c!=null )
           { 
               budget1.PMO_Project__r.test1__c = 'test';
              
              projects__c project = [select 
              
                                     name from projects__c where projects__c.id=:budget1.PMO_Project__r.Id] ;
                
               
               
              update(project) 
                          
           }       
          
          ApexPages.StandardController budgetController = new ApexPages.StandardController(budget1);
          return budgetController.save();
          //return page.budgetDetail;
     }

 

 

Appreciate Your Help,

 

Dhairya

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>
// BudgetController
public with sharing class BudgetDetailController {
 public static double total;
    
     Id id = System.currentPageReference().getParameters().get('id');
      public budget__C budget {get;set;}
    
      private final Budget__c budget1; 
    
      public BudgetDetailController(ApexPages.StandardController controller) {
    
      this.budget1= (Budget__C)Controller.getRecord();
      
    }
    
    //Ajax Monthly Readview
    
    public List<Budget__c> getMyBudgets() {
    return [SELECT Id, Name, Period__r.Month_Info__c, Value__c, Period__r.Quarter_Info__c FROM budget__c 
    ORDER BY LastModifiedDate DESC LIMIT 10];
       }
     //Ajax Quarterly View
    public void getMyBudgetsQuaters()
    {
   
    }
     public PageReference addMore()
     {
        
         
       total = total + budget1.value__c;
          budget1.test1__C=total;
          database.Insert(budget1);
        //  ApexPages.StandardController budgetController = new ApexPages.StandardController(budget1);
       //   budgetController.save();
          return page.budgetDetail;
     }
     
     public double getTotal()
     {
        
     }
}

 

<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>

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. 

 

 

trigger HealthOppProductTrigger on OpportunityLineItem (before insert, before update) {
 list <opportunitylineitem> opplines = trigger.new;
 for (Opportunitylineitem opp : opplines)
 {
 if(opp.ProductCode__c=='1000-1111')
 {
 if(trigger.isInsert ||  Trigger.oldmap.get(opp.id).quantity!=opp.Quantity || Trigger.oldmap.get(opp.id).unitprice!=opp.unitprice  )
 {
 if(opp.Quantity!=200.00 ||  opp.unitprice!=18 )
  
    opp.quantity.addError('Quantity Should be 200 and Unit Price should be $18');
    
     }
 
 }
              
        insert opp;
 }
}
Error Message at Runtime : Apex trigger HealthOppProductTrigger caused an unexpected exception, contact your administrator: iHealthOppProductTrigger: execution of BeforeInsert caused by: System.SObjectException: DML statment cannot operate on trigger.new or trigger.old: Trigger.iHealthOppProductTrigger: line 20, column 10
Appreciate your help.  
Thanks,
D

 

I would like to learn webservice API.

 

What are the resources and order in which i have to pursue?

 

Appreciate your response.

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

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 :

 

 

 

trigger OppotunityProductFulfillmentDateTrigger on OpportunityLineItem (before update) {
  
    // list<opportunityLineItem> lineItems = Trigger.new;
     
     user  u = [select username from user where lastname = 'view'];
     
     
    for (opportunityLineItem line : trigger.new)
    {
         if (line.Delivery_Details__c != NULL && (trigger.oldmap.get(line.id).Delivery_Details__c!= line.Delivery_Details__c))
         {
       
         Integer len = line.Delivery_Details__c.length();
        
         string s = line.Delivery_Details__c;
        
            String[] s1 = s.split('\\(');
            
            for(Integer i=1;i<=s1.size();i=i+2)
         {    
         s1[i]=s1[i].replace('\\)','');         
         task t= new task();
         t.subject='Training Required';
         t.ownerid= u.id;
         t.status='In Progress';
         t.priority='high';
         t.ActivityDate = date.valueof(s1[i].substring(0,10));
         t.whatid=line.OpportunityID;
          //  t.description+=s1[i].substring(0,10);
         insert t;
        
         }
    
         }
    }
    
    
It work fine when text field has one date say Qty 5  (2010-11-14). But it the value is  Qty2(2010-12-11) Qty3(2010-12-14)
it throw following error
OppotunityProductFulfillmentDateTrigger: execution of BeforeUpdate

caused by: System.ListException: List index out of bounds: 3

Trigger.OppotunityProductFulfillmentDateTrigger: line 21, column 14
I am not sure abt. this error.
Appreciate your response.
Dhairya

 

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

 

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

 

 

 

 

Hi,

 

   I am trying to deploy new custom object  named Complaint_Management from Sand Box to Production.

 

   Facing Error : 

 

 

# Deploy Results:
   File Name:    objects/Complaint_Management__c.object
   Full Name:  Complaint_Management__c
   Action:  NO ACTION
   Result:  FAILED
   Problem: The sharing model cannot be updated through the API.

 

 

 

Appreciate your response.

 

Thanks,

Dhairya

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

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  :

 

 

trigger EndUserAccountTrigger on Case (after insert) {
 list<account> accname = [select name from account where type='End User']; 
 list<account> tempaccname = new list<account>();
 for(case c: trigger.new)
 {
   for(account acc: accname)
 {
 if(acc.name != c.system__c)
 {
 tempaccname.add(new account(name=c.System__c));
 }
   
 }
 }
 database.insert(tempaccname);
}

 

 

 

 

 

 

 

 

 

 

 

 

But it throw an error.

 

     Appreciate your response.

 

Thanks,

Dhairya

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 

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

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.

  • August 23, 2011
  • Like
  • 0

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. 

  • August 12, 2011
  • Like
  • 0

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

     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   

Hi,

 

   Here i would likek to update test1__c value with related objects fields. But it didn't work at all.

 

 

 

trigger budTotalTrigger on Budget__c (after insert) {
   list <projects__c> projects = [select id,name,test1__C from Projects__C];
   
   for(budget__C bud : trigger.new)
   {
     for(projects__c pro : projects) 
     {
       if(pro.id == bud.PMO_Project__r.id)
       {
        pro.test1__c = pro.test1__C + bud.value__c;
      
       }
      database.update(pro);
    
     }
     
        
  
   }
}

 

 

 

Hi,
    {!addMore} is a coomand button action (VF) and blow code is a part of exdtension. I am getting current record  in variable named budget1 of type Budget__C. 
    I would like to calculate total budget value at project level on field test1__c on Project__C object.
    Question is creation of budget record working fine but budger related project field (test1__c) is not populated.
//Budget Record Save
     public PageReference addMore()
     {
                       
          
          database.Insert(budget1);
         if(budget1.value__c!=Null && budget1.PMO_Project__r.test1__c!=null )
           { 
               budget1.PMO_Project__r.test1__c = 'test';
              
              projects__c project = [select 
              
                                     name from projects__c where projects__c.id=:budget1.PMO_Project__r.Id] ;
                
               
               
              update(project) 
                          
           }       
          
          ApexPages.StandardController budgetController = new ApexPages.StandardController(budget1);
          return budgetController.save();
          //return page.budgetDetail;
     }

 

 

Appreciate Your Help,

 

Dhairya

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 :

 

 

 

trigger OppotunityProductFulfillmentDateTrigger on OpportunityLineItem (before update) {
  
    // list<opportunityLineItem> lineItems = Trigger.new;
     
     user  u = [select username from user where lastname = 'view'];
     
     
    for (opportunityLineItem line : trigger.new)
    {
         if (line.Delivery_Details__c != NULL && (trigger.oldmap.get(line.id).Delivery_Details__c!= line.Delivery_Details__c))
         {
       
         Integer len = line.Delivery_Details__c.length();
        
         string s = line.Delivery_Details__c;
        
            String[] s1 = s.split('\\(');
            
            for(Integer i=1;i<=s1.size();i=i+2)
         {    
         s1[i]=s1[i].replace('\\)','');         
         task t= new task();
         t.subject='Training Required';
         t.ownerid= u.id;
         t.status='In Progress';
         t.priority='high';
         t.ActivityDate = date.valueof(s1[i].substring(0,10));
         t.whatid=line.OpportunityID;
          //  t.description+=s1[i].substring(0,10);
         insert t;
        
         }
    
         }
    }
    
    
It work fine when text field has one date say Qty 5  (2010-11-14). But it the value is  Qty2(2010-12-11) Qty3(2010-12-14)
it throw following error
OppotunityProductFulfillmentDateTrigger: execution of BeforeUpdate

caused by: System.ListException: List index out of bounds: 3

Trigger.OppotunityProductFulfillmentDateTrigger: line 21, column 14
I am not sure abt. this error.
Appreciate your response.
Dhairya

 

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

 

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

 

 

 

 

Hi,

 

   I am trying to deploy new custom object  named Complaint_Management from Sand Box to Production.

 

   Facing Error : 

 

 

# Deploy Results:
   File Name:    objects/Complaint_Management__c.object
   Full Name:  Complaint_Management__c
   Action:  NO ACTION
   Result:  FAILED
   Problem: The sharing model cannot be updated through the API.

 

 

 

Appreciate your response.

 

Thanks,

Dhairya

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

I have a question, with Data Loader can we map custom fields to standard fields?

  • December 02, 2010
  • Like
  • 0

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.

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  :

 

 

trigger EndUserAccountTrigger on Case (after insert) {
 list<account> accname = [select name from account where type='End User']; 
 list<account> tempaccname = new list<account>();
 for(case c: trigger.new)
 {
   for(account acc: accname)
 {
 if(acc.name != c.system__c)
 {
 tempaccname.add(new account(name=c.System__c));
 }
   
 }
 }
 database.insert(tempaccname);
}

 

 

 

 

 

 

 

 

 

 

 

 

But it throw an error.

 

     Appreciate your response.

 

Thanks,

Dhairya