• anil 007
  • NEWBIE
  • 50 Points
  • Member since 2010

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

Hello,

 

I have a object Industry (with lookup on Accounts and some text fields). Then another object Results (also linked with Accounts) that is manually imported.

 

Can I create a trigger that every time I create a Results record would query the Industry object and would return some of it's text fields to be copied to the Results record?

hi,

 

i am new to integration part,iam trying to integrate sforce with java

 

please tell me how can i achive it.

 

 

Hiiii,

 

Iam working on email to case settings  ,iam getting this error

 

 

Message: Connection timed out: connect;
  nested exception is:
        java.net.ConnectException: Connection timed out: connect

 

my sfdcconfig file :

 

<configFile>
    <sfdcLogin>
        <url>https://www.salesforce.com/services/Soap/u/9.0</url>
        <userName>xxxxxxxxxxxxxxxxx</userName>
        <password>xxxxxxxxxxxxxxxxxNgmj4I6enYldFH37ANfXaRaF</password>
        <loginRefresh>30</loginRefresh>
        <timeout>5000</timeout>
    </sfdcLogin>
    <notify>
  <notifyEmail>xxxxxxxxxx</notifyEmail>
        <from>xxxxxxxxx</from>
        <host>imap.gmail.com</host>
  <port>465</port>
        <user></user>
        <password></password>
        <service>com.sforce.mail.SMTPNotification</service>
    </notify>
    <attachments>
        <largeAttachmentDirectory>C:\Users\CRM5\Downloads\EmailAgent\EmailAgent</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>C:\Users\CRM5\Downloads\EmailAgent\EmailAgent</largeAttachmentURLPrefix>
        <largeAttachmentSize>1</largeAttachmentSize>
    </attachments>
    <services>
        <com.sforce.mail.EmailService>C:\Users\CRM5\Downloads\EmailAgent\EmailAgent\email2case.txt</com.sforce.mail.EmailService>
    </services>
</configFile>

<configFile>
    <server1>
        <url>imap.gmail.com</url>
        <protocol>IMAP</protocol>
        <userName>**********@gmail.com</userName>
        <password>**********</password>
        <interval>10</interval>
        <inbox>Inbox</inbox>
        <readbox>Inbox</readbox>
        <errorbox>salesforce</errorbox>
    </server1>
</configFile>


Plz help me it's urgent

 

 

hiii ,

 

please help me with this code

 

trigger Lead_Opp on Lead (after insert) {
List<Opportunity> contact = new Opportunity[0];
List<Lead>lead=[SELECT Id, status ,name FROM lead WHERE Id in :Trigger.new];
 for(Lead a: Trigger.new)
 {
   if(a.status!=null)
    {   
 // contact.add(new Opportunity(Name ='anil',CloseDate=System.today(),stagename='qualification'));  
 // a.test_field__c='OKnott';
    Database.LeadConvert lc = new database.leadconvert();  
    lc.setLeadid(a.id);
    
     lc.setConvertedStatus('');
   //   Database.LeadConvertResult lcr = Database.convertLead(lc);
       
    }
    else
    {
      System.debug('fsdfds');
  //  a.test_field__c='OK';
    }
}
insert contact;
     
    }

 

 

iam getting error please help me.

Hii,

 

i have an requirement.in this the job seekers send their resumes to jobs@gmail.com,when a new resume has been received,that corresponding contact details has  to be saved in my saleforce account in contacts, activity history,and then i have to read the attached file and i need to save it in my system.

 

plz help,

 

thanks in advance

 

hi,


how to auto populate the look up field with admin login name in vf page .

hiii,

 

i  need to create a Class to house most of your code methods to actually do the processing, and then have a separate Class defined as Schedulable, which calls the methods in your other class. I’d like you to build the “called” Class first, and then the actual Scheduler.i need to write batch and schedule apex class for the following requirement.

 

 

Query Tasks and Events to make sure these fields are up to date. Since this will run every day after midnight, you will only need to act on situations where (What.Type = ‘Opportunity’) and ( (ActivityDate = yesterday) or (LastModifiedDate = yesterday)). Use the WhatIDs from those Activities to query the Opportunities in question.

 

  • Opportunity fields to update:

o   Most Recent QA Call Date (Events)

§  Event.Event_Type__c = "QA Call", max (date) <= today

o   Most Recent QA Call Grade (Events)

§  Event.Event_Type__c = "QA Call", max (date) <= today

o   Next PA Date (Events)

§  Event_Type__c = "Phone Appointment"  MIN(ActivityDate) >= TODAY

o   How many prewires were completed (Tasks)

§  Count of Tasks on Opportunity where Task Type = Prewire and Status = Scheduled OR Completed AND Start Date < Today

 

plz  help me to solve this one

 

Thanks in advance

 

Anil Kumar

 

 

 

 

hiii,

 

i have an bach apex class i want to write a schedule class for this batch apx class for evereday afternoon  at 1PM

 

Can anyone provide sample code for schedule apex class

 

 

HII,

 

I have an req in which i have to handle batch and schedule apex classes

 

can any one explain me about this things

 

 

 

 

HII,

 

i just want to lock a record if a select type is restricted

 

ie

i have a picklist with 2 values restricted and not restricted

 

if  i select restricted then that particular record should ask that permission required

 

 


HIII,

 

i have an custom object .it is defined as intersection between accounts and contacts

 

as per my understanding is it like A ^ B ( A intersection  B)  :smileywink:

 

plz help

 

Thanks

 

 

Anil


<apex:page controller="monthlyreport" >
<apex:form >
<apex:pageBlock title="Monthly Report">
<p>
Select Date:
<apex:selectList value="{!dt}" id="abc" size="1" >
<apex:selectOptions value="{!dateinfo}" >
<apex:actionSupport event="onchange" reRender="cdf,theRepeat" rendered="true" />
</apex:selectOptions>
</apex:selectList>
</p>
<apex:commandButton value="Generate" action="{!setdivName}" reRender="cdf,theRepeat"/>
</apex:pageBlock>
</apex:form>
<apex:pageBlock title="Report" id="cdf">
<apex:outputPanel rendered="{!dt=null}">
<table border='1' size='100' columnswidth="150px,150px" cellpadding="6" >
<tr>
<th>S.NO.</th>
<th>Particulars</th>
<th>Uom</th>
<th>Quantity</th>
<th>Rate</th>
<th>Amount</th>
</tr>
<apex:repeat value="{!LineItems}" var="s" id="theRepeat" >
<tr>
<td>{!s.itm}</td><td>{!s.itm}</td><td>{!s.itm}</td><td>{!s.itm}</td><td>{!s.itm}</td>
</tr>
</apex:repeat>
</table>
</apex:outputPanel>
</apex:pageBlock>
</apex:page>

public class monthlyreport {

  

    public String item { get; set; }

    public String monthlyreport { get; set; }

    public PageReference setdivName() {
        return null;
    }


  public integer s;

    public Date dt { get; set; }

    public String getDe() {
        return null;
    }

 //public List<wrapperList> LineItems{get;set;}
    public List<wrapperList> getLineItems(){return LineItems;}

//public List<Sales_det__c> sal,sal1,sal2;
   List<Saledate__c> seo=[select  date2__c from Saledate__c where id!=null ];
  public List<Sales_det__c> Sal=[select date__c,item_meas__c,Item_name1__c,Item_rate1__c,locat__c,quantity__c from Sales_det__c where date__c=:dt];
List<wrapperList> LineItems = new List<wrapperList>();
public List<selectoption> getdateinfo()
{

List<selectoption> se1=new List<selectoption>();
se1.add(new SelectOption('Select Date','select Date'));
for(Saledate__c  sel:seo)
{
se1.add(new SelectOption(sel.id,String.valueOf(sel.date2__c)));

}

return se1;
}

 
  
    public Integer getsno()
     {
     Integer i = [select count() from Sales_det__c where date__c=:dt];
     return i;
     }


  public String  getsno1()
   {
    String s=[select  Item_name1__c from Sales_det__c where  date__c=:dt ].item_name1__c;
//String s1=String.valueOf(s.Item_name1__c);
return s;

}


  public List<Sales_det__c> getsno2()
   {
   List<Sales_det__c> s1=[select  item_meas__c  from Sales_det__c where  id =:'a0L900000000a3p' ];

return s1;

}


  public List<Sales_det__c> getsno3()
   {
   List<Sales_det__c> s2=[select quantity__c from Sales_det__c where  id =:'a0L900000000a3p' ];

return s2;

}
 List<Sales_det__c> dat=[select  item_meas__c  from Sales_det__c where date__c=:dt];


  public List<Sales_det__c> getsno4()
   {
   List<Sales_det__c> s3=[select  Item_rate1__c  from Sales_det__c where  id =:'a0L900000000a3p' ];

return s3;

}

  public String  getsno5()
   {
  
return null;
}
public String[] getStrings() {

 List<Sales_det__c> s=[select date__c,item_meas__c,Item_name1__c,Item_rate1__c,locat__c,quantity__c from Sales_det__c where id='a0L900000000a3p'  ];
 //  LineItems.add(new wrapperList(sal));
 if(!s.isEmpty()){
   LineItems.add(new wrapperList(s));
 }
//String s1=String.valueOf(s.Item_name1__c);

        return new String[]{'ONE','TWO','THREE'};

    }
   public class wrapperList{
    public List<Sales_det__c> l{get;set;}
     public String div{get;set;}
       public String prod{get;set;}
       public integer no{get;set;}
        public decimal prod1{get;set;}
       public String itm{get;set;}
       public decimal rev{get;set;}
    public List<String> ttt=new List<String>();
       public List<String> s;
   
public wrapperList(List<Sales_det__c> li){
no=1;
l=li;
  if(!li.isEmpty() && li.size()>0){
   for(Sales_det__c b:li){
   no=no+1;
  if(b!=null)
  {
  
div=b.item_meas__c;
itm=b.Item_name1__c;
rev=b.Item_rate1__c;
prod=b.locat__c;
prod1=b.quantity__c;

  }
     
   }
   
  }

}
     
   }

}

 

please help me iam not able to find out problem with repeat controller

 

 

 

 

please help mee

 

 

 

Thanks in adv

 

Anil

HIII.

 

i have an custom object based on the soql i have to display the results

 

how to write a repeat controller to show results on the vf page

 

plz help me

 

 

 

HIII,

 

how to integrate salesforce with outlook 2010

 

plz help iam new to salesforce

Are their any tutorial on this technology....do we have any trial version available in castiron computing..

Are their any tutorial on this technology....do we have any trial version available in castiron computing..

 

 

HIIII

 

Any one worked on castiron integration please help me how to deal it.

 

Thanks in advance

HII,

 

i have 2 objects account and users

i want to have m2m relation b/w these 2 objects

 

PLLLzzzz  help

 

hiii,

 

i have an bach apex class i want to write a schedule class for this batch apx class for evereday afternoon  at 1PM

 

Can anyone provide sample code for schedule apex class

 

 

I tried for the above requirement in the following way ...and stuck up in the middle..... please suggest as how to move ahead...

 

<apex:page controller="accountcontroller">

<apex:form>

<apex:inputText  value="{!name}"/>

<apex:commanButton value="submit" action="{!submit}"/>

</apex:form>

</apex:page>

 

public class accountcontroller()

{

public String name{set;get;}

public void setname(String name)

{

this.name = name;

}

public pagereference submit()

{

list<Account> mylist = new list<Account>();

mylist = [select name from Account where name like :name+'%'];

}

public accountcontroller()

{

}

}

Hi,

 

I have Got requirement like this....When ever a account created, some of the fields from account should automatically populate into Opportunity , that means when i click new opportuinity some of the accounts fields should appear there..

 

 

 

Can any one tel me how to write trigger for recortype

SO, I'm trying to build a case multi-edit page that will be using a case list to define the cases shown when the custom link is selected.

 

here is my existing code, which works great, but will only return 20 rows, regardless of how many are in the list:

 

 

<apex:page standardController="Case" 
           recordSetVar="cases"
           tabStyle="Case" sidebar="false">
  <apex:form >
    <apex:pageBlock >
      <apex:pageMessages />
      <apex:pageBlockButtons >
        <apex:commandButton value="Quick Save" 
                            action="{!quicksave}"/>
        <apex:commandButton value="Save" 
                            action="{!save}"/>
      </apex:pageBlockButtons>
      <apex:pageBlockTable value="{!cases}" 
                           var="c">
        <apex:column value="{!c.casenumber}"/>
        <apex:column value="{!c.subject}"/>
        <apex:column headerValue="Upgrade Status">
         <apex:inputField value="{!c.Upgrade_Status__c}"/>
         </apex:column>
        <apex:column headerValue="SP Installed">
         <apex:inputField value="{!c.SP_Installed__c}"/>
         </apex:column>
        <apex:column value="{!c.SP_To_Install__c}"/>
        <apex:column headerValue="Status">
          <apex:inputField value="{!c.status}"/>
        </apex:column>
      </apex:pageBlockTable>    
    </apex:pageBlock>
  </apex:form>
</apex:page>

 I'm not particularly sure how I should be using the <apex:repeat> tag, can someone lend some assistance, seems like it should be easy enough but it's stumping me.

 

Cheers,

Ward

 

HII,

 

i just want to lock a record if a select type is restricted

 

ie

i have a picklist with 2 values restricted and not restricted

 

if  i select restricted then that particular record should ask that permission required

 

 


HIII,

 

i have an custom object .it is defined as intersection between accounts and contacts

 

as per my understanding is it like A ^ B ( A intersection  B)  :smileywink:

 

plz help

 

Thanks

 

 

Anil


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 an Invoice object and I want to create a button that on-click will send an email with the related Invoice information to the customer.

 

I have created an email template for this but I'm not sure how to write the APEX code such that when I mark an Invoice and press the button an email will be sent to the contact designated in the invoice including the rest of the detailes in the invoice.

 

If not APEX is there any other way to achieve the same?

 

Thanks

 

 

  • November 26, 2010
  • Like
  • 0

HIII,

 

how to integrate salesforce with outlook 2010

 

plz help iam new to salesforce

hi,

 

I hav created a user in my organisation(in developer edition).

 

I want to delete that user. how to do this?there is no delete button for that.

 

 

please help me....

 

regards,

vvnrao

  • November 24, 2010
  • Like
  • 0

Hello Hi...

 

             I have created a dynamic picklist using VF page and apex class but can we use this functionality to make dependent picklist so that a client can add to the picklist with ease.. And thanks in advance for any help which you people can give me...

Hello,

 

I have a object Industry (with lookup on Accounts and some text fields). Then another object Results (also linked with Accounts) that is manually imported.

 

Can I create a trigger that every time I create a Results record would query the Industry object and would return some of it's text fields to be copied to the Results record?

Hi,

  I am very new to Apex and Virtualforce development.  Here is what I need to do.. I need directions to how to go about it.

 

I have a custom button on Account page called  List Assests from XXX webpage.  When i click on it,  I need to load a a  400 X300 iframe with external URL like www.xxx.com/assests?id={!account.id} some where in the page layout with a list of assetts . I cannot leave the page or load it in a new window.  This should re render, every time I click the button.

 

Do my question is how do I associate a custom object, custom field to a VF page and how do i make it rerender from a button on the Account Page and make sure it all remains in the same page layout.

 

 

Thanks.

  • November 19, 2010
  • Like
  • 0

Hi,

 

I am trying to send a notification email whenever a case is created with the attachments that were included in the email which created the case. I am able to get the code developed and it sends the notification email but the attachment is not getting through please help

trigger EmailNotification on Case (after insert, after update) {
    for(Case c : system.Trigger.New) {
//        if(c.Notified__c == true) {
            List<EmailTemplate> listET = new List<EmailTemplate>();
            List<User> listOwner = new List<User>();
            List<Attachment> listAttch = new List<Attachment>();
            listET = [select Id, Name, Body, Subject from EmailTemplate where Name = 'Support: Case Assignment Notification'];
            listOwner = [select Id, Name, Email from User where Id = : c.OwnerId];
            listAttch = [select Id, Name, Body, ParentId, ContentType from Attachment where ParentId = : c.Id];
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
            Messaging.EmailFileAttachment emailAttch = new Messaging.EmailFileAttachment();
            if(listAttch.size() > 0) {
                for(integer i = 0; i < listattch.size(); i++) {
                    emailAttch.setFileName(listAttch[i].Name);
                    emailAttch.setBody(listAttch[i].Body);
                    emailAttch.setContentType(listAttch[i].ContentType);
                }
                mail.setFileAttachments(new Messaging.EmailFileAttachment[] {emailAttch});
            }
            string[] toadresses;
            for(integer j = 0; j < listOwner.size(); j++) {
                toadresses = new string[] {listOwner[j].Email};
            }
            mail.setToAddresses(toadresses);
            mail.setReplyTo('spprtemail5@gmail.com');
            mail.setSenderDisplayName('SupportEmail');
            for(integer k = 0; k < listET.size(); k++) {
                mail.setSubject(listET[k].Subject);
                mail.setHtmlBody(listET[k].Body);
            }
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
//        }
    }
}