• Ganu
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 23
    Replies

Hi sfdc,

 

How to integrate Tally with saleforce.com.

 

Thanks,

Ganesh

  • February 25, 2010
  • Like
  • 0
I am able to Synchronize the Account table from Salesforce to Mysql using Xampp. The records are getting inserted. If I add new fields in SF, I would like my PHP to automatically create the fields in Mysql. Please guide me.
  • March 09, 2009
  • Like
  • 0

I am able to Synchronize the Account table from Salesforce to Mysql using Xampp. The records are getting inserted. If I add new fields in SF, I would like my PHP to automatically create the fields in Mysql. Please guide me.

 

 

  • March 06, 2009
  • Like
  • 0
I have created visual force page, using .swf file(I have upload in static resource) its working fine in the SF tabs, but its not when I include in Site page, when I right click there it says "Movie not loaded.."
Code:
<apex:page showHeader="false" sidebar="false">
<apex:form >
<apex:flash src="{!$Resource.Gaugesemicircular}" flashvars="Maxi" width="110%" height="150%" play="true"/>    
</apex:form> 
</apex:page>

 Please let me know where I commited mistakes?
  • December 22, 2008
  • Like
  • 0
I have created one flex component and I include this in static resource and I call this in my visual force page by this direction
Code:
<apex:page>
<apex:flash height="55%" width="80%" src="{!$Resource.Gaugesemicircular}"></apex:flash>
</apex:page>
Its working fine in the local system but its not, when I integrate in SF.
Please let me know where I committed mistakes.

 
  • December 18, 2008
  • Like
  • 0

In PE, I have overridden the Standard New button(opportunity) by Vforce page, And in Contact related list for opportunity I have created a custom list button and I remove the standard button from the view(which is overridden by vf page i.e. New), I have assign an scontrol for the custom button. When hit this custom button it call VF page rather than scontrol. Please give your suggestion!

 

--

Ganu

 
  • December 15, 2008
  • Like
  • 0
I need to send a SMS to the mobile number which is stored in Contact record(This should be done automatically after creating the Contact), Is it possible in Apex Trigger ?
 
Please give your suggestion!
  • December 15, 2008
  • Like
  • 0
How to get the details of approval history like how many leads are approved,rejected,recalled through Reports.
Since I am new to this Approval Process, I am not able to find the direct way to display Approval History under reports.
 
At present,once Manager is approved or rejected the lead, Lead status is automatically updated to Approved/Rejected. Then I will create a report where Lead status equals Approved or Rejected.
 
Please give suggestion on this....
 
Thanks in advance.
 
 
-- Ganu
 
  • November 26, 2008
  • Like
  • 0
Hi,
Can use we xls Connector in sandbox for inserting sample records, because I need to test my triggers for bulk update?
 
Thanks,
Ganu
  • November 10, 2008
  • Like
  • 0
Hi,
I have written a Test Method for the below Trigger but am getting only 44% of test coverage. This trigger finds the Max of Close date from the Opportunities and calculates the sum of Opportunity Amount.
Please! Can anybody give a suggestion for this?
 
My code:
trigger DonationUpdateonContact on Opportunity bulk(after insert, after update)
 {
  if(Trigger.isInsert || Trigger.isupdate)
  { 
   for (Opportunity opp :Trigger.new)
   {
    Id OppId;     
   OppId = opp.Id;
   Date Contactdate;
   Double totgift=0;
   OpportunityContactRole[] ThisOppRole = [select ContactId,Opportunity.Amount,Opportunity.CloseDate From
   OpportunityContactRole WHERE Opportunity.Id = :opp.Id];
   if (ThisOppRole.size()>0)
   {                     
                  OpportunityContactRole[] ThisOppRole1=[select Id,ContactId,Opportunity.Amount,Opportunity.CloseDate From
                   OpportunityContactRole WHERE ContactId= :ThisOppRole[0].ContactId order by Opportunity.CloseDate DESC];
                                      
                      if (ThisOppRole1.size()>0)
                      {
                        Contactdate = ThisOppRole1[0].Opportunity.CloseDate;
                        for(integer i=0;i<ThisOppRole1.size();i++)
                        {               
                        totgift+=ThisOppRole1[i].Opportunity.Amount;               
                        }                                                  
                        Contact CurrentContact = [select Id,Last_Donation_Date__c,Total_of_all_gifts_given__c  from Contact
                        where Id=:ThisOppRole1[0].ContactId];
                        CurrentContact.Total_of_all_gifts_given__c=totgift;                         
                        CurrentContact.Last_Donation_Date__c=Contactdate;
                        update  CurrentContact;
                     }                            
       }
     }
  }
Test Method:
public class DonationUpdateoncontacttest
{
    public static testMethod void DonationUpdateonContact()
    {
       Id OppId;     
       Date Contactdate;
       Double totgift=0;
       Id ContactId=null;
       integer i=0;
     Account acc=new Account(Name='NewAcc');
     insert acc;    
     Contact cp= new Contact(LastName='ContactTest',AccountId=acc.Id,Contact_type__c='Donor',Donor_Status__c='Active',Last_Donation_Date__c=system.today(),Total_of_all_gifts_given__c=12,Boardmember_type__c='Board chair',Member_Type__c='Current',Staff_Status__c='Current staff');
     insert cp;
     Opportunity  oppc=new Opportunity (Name='Newopp',StageName='Posted',closedate=system.today(),Amount=10);
     insert oppc;
      OpportunityContactRole oppr=new OpportunityContactRole(Role='Donor',OpportunityId=oppc.Id,ContactId=cp.Id,Isprimary=true);
     insert oppr;
        OpportunityContactRole[] ThisOppRole = [select ContactId,Opportunity.Amount,Opportunity.CloseDate From
        OpportunityContactRole WHERE Opportunity.Id = :oppc.Id];       
           OpportunityContactRole[] ThisOppRole1 = [select Id,ContactId,Opportunity.Amount,Opportunity.CloseDate From
           OpportunityContactRole WHERE ContactId= :ThisOppRole[0].ContactId order by Opportunity.CloseDate DESC];
           for(i=0;i<ThisOppRole1.size();i++)
           {               
            totgift+=ThisOppRole1[i].Opportunity.Amount;               
           } 
           Contactdate = ThisOppRole1[0].Opportunity.CloseDate;
           Contact CurrentContact = [select Id,Last_Donation_Date__c,Total_of_all_gifts_given__c  from Contact
           where Id=:ThisOppRole1[0].ContactId];
           CurrentContact.Total_of_all_gifts_given__c=totgift;                         
           CurrentContact.Last_Donation_Date__c=Contactdate;
           update CurrentContact;
  }
}
Thanks,
Ganu
 
  • November 04, 2008
  • Like
  • 0
Hi,
I have an Account lookup in my custom object.  This is not showing all the the Account records, its showing only the recently viewed Account records. In Search Settings, I set the display for Account object as "50" .
 
Thanks,
Ganu
 
  • October 09, 2008
  • Like
  • 0

Hi would anyone happen to know how to write a testmethod for my trigger below:

trigger rollupTrigger on Commitment_Draw__c (after insert, after update, after delete)
{
    double totalSum = 0;
    Commitment_Draw__c[] c = trigger.new;
    if(Trigger.isUpdate || Trigger.isInsert)
    {
       for(Commitment_Draw__c cd : c)
       {
        for(Opportunity parent : [select Id,Name from Opportunity where Id = :cd.Opportunity__c])
        {
         for(Commitment_Draw__c childObject : [select Id,Opportunity__c,Amount__c from Commitment_Draw__c where Opportunity__c = :parent.Id])
            {
                  totalSum += childObject.Amount__c;
            }
            parent.Rollup__c = totalSum;  
            update parent;                    
        }
      }
    }
    else if(Trigger.isDelete)
    {
        Commitment_Draw__c [] cold = Trigger.old;
      for(Commitment_Draw__c oldobj :cold) 
      {
        for (Opportunity parentObject : [select Id,Name from Opportunity where Id= :oldobj.Opportunity__c])
        {
          for (Commitment_Draw__c childObject : [select Id,Opportunity__c,Amount__c from Commitment_Draw__c where Opportunity__c = :parentObject.Id])  
          {
             totalSum += childObject.Amount__c; 
          }
            parentObject.Rollup__c = totalSum;  
            update parentObject;                     
         }  
      }
    }
}

  • September 05, 2008
  • Like
  • 0
Hi,
Need Help on Apex class,
I need to create record in object A with the lookup reference in object B(Connector object) with some other fields in both the objects,
when i create a record in object A, it should create on B also.
now am running a trigger with (before insert,before update).
More helpfull when u send a sample code.

Thanks,
Ganu
  • August 25, 2008
  • Like
  • 0
How can I create a new Menu button(like the button named as Create New Approval Process which appears in Approval Processes under Workflow & Approvals)in the records view/Detail page.
 
Any suggestions.Thanks in advance...
 
 
  • February 07, 2008
  • Like
  • 0

Hi,

I am a newbe here and i dont know if this is the right place to ask, but i will ask anyway.

I want to create 2 fields that appear in the Contact layout only when a 3rd field has a certain value, at all other times they are hidden or at least unaccesable.

How can i do that ?

Eran

Hi,

 

I am encountering the following error when trying to invoke an approval process from a trigger. 

 

changeAmounts: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: ALREADY_IN_PROCESS, Cannot submit object already in process.: Trigger.changeAmounts: line 11, column 41

 

Here is the trigger code. I have tried several variations always with the same result. I have confirmed there is not an active approval process for the record.

 

trigger changeAmounts on Opportunity (after update) { Opportunity opp; opp = Trigger.old[0]; if (Trigger.old[0].Amount <> Trigger.new[0].Amount) { Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest(); req1.setComments('Submitting request for approval.'); req1.setObjectId(opp.id); Approval.ProcessResult result1 = Approval.process(req1); } }


Any help is appreciated.


Thanks.

 

 

I have created visual force page, using .swf file(I have upload in static resource) its working fine in the SF tabs, but its not when I include in Site page, when I right click there it says "Movie not loaded.."
Code:
<apex:page showHeader="false" sidebar="false">
<apex:form >
<apex:flash src="{!$Resource.Gaugesemicircular}" flashvars="Maxi" width="110%" height="150%" play="true"/>    
</apex:form> 
</apex:page>

 Please let me know where I commited mistakes?
  • December 22, 2008
  • Like
  • 0
I have created one flex component and I include this in static resource and I call this in my visual force page by this direction
Code:
<apex:page>
<apex:flash height="55%" width="80%" src="{!$Resource.Gaugesemicircular}"></apex:flash>
</apex:page>
Its working fine in the local system but its not, when I integrate in SF.
Please let me know where I committed mistakes.

 
  • December 18, 2008
  • Like
  • 0
I need to send a SMS to the mobile number which is stored in Contact record(This should be done automatically after creating the Contact), Is it possible in Apex Trigger ?
 
Please give your suggestion!
  • December 15, 2008
  • Like
  • 0
Code:
flex code:
<—XML version="1.0" encoding="UDF-8"–>
<Max:Application comeliness:Max="http://www.Adobe.Com/2006/maximal" layout="absolute" 
 comeliness:salesforce="http://www.salesforce.com/" creationComplete="login(event)">
 <salesforce:Connection id="apex" serverUrl="https://www.salesforce.com/services/Soap/u/x.x"/>
  
<mx:Script>
 <![CDATA[
 import mx.collections.ArrayCollection;
 import com.salesforce.results.QueryResult;
 import mx.utils.ObjectUtil;
 import mx.controls.Alert;
 import com.salesforce.AsyncResponder;
 import com.salesforce.objects.LoginRequest;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;
 
 private function login(event:Event):void {
  var lr:LoginRequest = new LoginRequest();
  lr.server_url = parameters.server_url;
  lr.session_id = parameters.session_id;
  lr.username="uid";
  lr.password="pwd+token";
  lr.callback = new AsyncResponder(loadData, handleFault);
  apex.login(lr);
 }
 [Bindable]
 private var accountList:ArrayCollection = new ArrayCollection();
 
 private function handleFault(fault:Object):void {
  Alert.show(ObjectUtil.toString(fault));
 }
 
 private function loadData(lr:Object):void {
  apex.query("Select Name, Phone, Type From Account", new AsyncResponder(
   function(qr:QueryResult):void {
    if (qr.size > 0) {
     accountList = qr.records;
    }
   }, 
   handleFault)
  );
  test.send();
 }
 
 public function yahoo(res:ResultEvent):void
 {
  Alert.show(res.result as String); 
 }
 
 public function yahooFault(evt:FaultEvent):void
 {
  Alert.show(evt.fault.message);
 }
  
 ]]>
</mx:Script>
 <mx:DataGrid dataProvider="{accountList}" left="10" right="10" top="10" bottom="10">
  <mx:columns>
   <mx:DataGridColumn headerText="Name" dataField="Name"/>
   <mx:DataGridColumn headerText="Phone" dataField="Phone"/>
   <mx:DataGridColumn headerText="Type" dataField="Type"/>
  </mx:columns>
 </mx:DataGrid>
 <mx:HTTPService id="test" 
  url="http://yahoo.com" 
  resultFormat="text" 
  result="yahoo(event)" 
  fault="yahooFault(event)"
  method="GET"
  useProxy="false"/>
</mx:Application>
VF CODE:
<apex:page sidebar="false" showHeader="false" title="FlexT">
<apex:form >
            
            <apex:flash width="1122" height="500" flashvars="session_id={!$Api.Session_ID}&server_url={!$Api.Partner_Server_URL_90}&buildingId={!building}" src="{!$Resource.s5}" />
             </apex:form>

</apex:page>

Here am trying to make an http call to flex to salesforce.

when am running my application in flex it is geting data and generating http response .but when am integrating flex resource as static resourses in salesforce ,am geting data on flex page.but their is no http reponse .I am geting the security error.
faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:destination: DefaultHTTP'

1) I installed flex tool kit in proper place and enabled remote sitisetting and rigestered my site also.

any one tell some solution for it˜.it is possible comunicate salesforce using http form flex to salesforce.



 
  • December 12, 2008
  • Like
  • 0
I am loading 5,000 contacts from a spreadsheet and I know that some of these contacts already exist in the current organization. Do you know if there is any application that can be used to de-dup these contacts when I am mass loading rather than having to merge them one at a time?
 
Thanks!
  • November 25, 2008
  • Like
  • 0
Hi All,

I've been pulling my hair out on this one for the past few hours.

I'm running a CMD line data loader job to extract case data to send to Oracle.  I need to be able to extract the Owner Profile ID so that I can filter my results later in SQL.

Right now, my best sample SOQL I have for testing is this:

Select Id, CaseNumber, ContactId, AccountId, OwnerId, Case.Owner.ProfileID FROM Case WHERE CaseNumber = '00836387'

However the return for Case.Owner.ProfileID comes back as a blank field even though it has a value elsewhere.

Am I missing something here.

Cheers,
Ward
  • November 21, 2008
  • Like
  • 0
Hi,
I wrote query in JavaScript and I get this message: "unterminated string constant".
I think it happens because the line break (maybe not).
How can i solve it?
 
the query:
var records = sforce.connection.query("select Date_Of_Order__c,
from Dongle__c,
where (Name = 'dongNum')");
 
Thanks,
Chen
So I am trying to do something very simple but it doesnt want to update the field. After a user creates a case I want to update a field in that case based on what the user entered. Problem is it just doesnt put anything in there. The field is a text box on the case. This seems like it should put something in there.. Am I missing anything here?
 
trigger updateCase on Case (after update, after insert)
{
Case[] cs = [select Id, AccountId, Account_Owner__c, Account_Owner_Email__c  from Case where Id in :Trigger.new];
 
cs[0].Account_Owner_Email__c = 'Something';  //for now just hard coding something in to see the field actually update

}
Hi,
Can use we xls Connector in sandbox for inserting sample records, because I need to test my triggers for bulk update?
 
Thanks,
Ganu
  • November 10, 2008
  • Like
  • 0
Hi,
I have written a Test Method for the below Trigger but am getting only 44% of test coverage. This trigger finds the Max of Close date from the Opportunities and calculates the sum of Opportunity Amount.
Please! Can anybody give a suggestion for this?
 
My code:
trigger DonationUpdateonContact on Opportunity bulk(after insert, after update)
 {
  if(Trigger.isInsert || Trigger.isupdate)
  { 
   for (Opportunity opp :Trigger.new)
   {
    Id OppId;     
   OppId = opp.Id;
   Date Contactdate;
   Double totgift=0;
   OpportunityContactRole[] ThisOppRole = [select ContactId,Opportunity.Amount,Opportunity.CloseDate From
   OpportunityContactRole WHERE Opportunity.Id = :opp.Id];
   if (ThisOppRole.size()>0)
   {                     
                  OpportunityContactRole[] ThisOppRole1=[select Id,ContactId,Opportunity.Amount,Opportunity.CloseDate From
                   OpportunityContactRole WHERE ContactId= :ThisOppRole[0].ContactId order by Opportunity.CloseDate DESC];
                                      
                      if (ThisOppRole1.size()>0)
                      {
                        Contactdate = ThisOppRole1[0].Opportunity.CloseDate;
                        for(integer i=0;i<ThisOppRole1.size();i++)
                        {               
                        totgift+=ThisOppRole1[i].Opportunity.Amount;               
                        }                                                  
                        Contact CurrentContact = [select Id,Last_Donation_Date__c,Total_of_all_gifts_given__c  from Contact
                        where Id=:ThisOppRole1[0].ContactId];
                        CurrentContact.Total_of_all_gifts_given__c=totgift;                         
                        CurrentContact.Last_Donation_Date__c=Contactdate;
                        update  CurrentContact;
                     }                            
       }
     }
  }
Test Method:
public class DonationUpdateoncontacttest
{
    public static testMethod void DonationUpdateonContact()
    {
       Id OppId;     
       Date Contactdate;
       Double totgift=0;
       Id ContactId=null;
       integer i=0;
     Account acc=new Account(Name='NewAcc');
     insert acc;    
     Contact cp= new Contact(LastName='ContactTest',AccountId=acc.Id,Contact_type__c='Donor',Donor_Status__c='Active',Last_Donation_Date__c=system.today(),Total_of_all_gifts_given__c=12,Boardmember_type__c='Board chair',Member_Type__c='Current',Staff_Status__c='Current staff');
     insert cp;
     Opportunity  oppc=new Opportunity (Name='Newopp',StageName='Posted',closedate=system.today(),Amount=10);
     insert oppc;
      OpportunityContactRole oppr=new OpportunityContactRole(Role='Donor',OpportunityId=oppc.Id,ContactId=cp.Id,Isprimary=true);
     insert oppr;
        OpportunityContactRole[] ThisOppRole = [select ContactId,Opportunity.Amount,Opportunity.CloseDate From
        OpportunityContactRole WHERE Opportunity.Id = :oppc.Id];       
           OpportunityContactRole[] ThisOppRole1 = [select Id,ContactId,Opportunity.Amount,Opportunity.CloseDate From
           OpportunityContactRole WHERE ContactId= :ThisOppRole[0].ContactId order by Opportunity.CloseDate DESC];
           for(i=0;i<ThisOppRole1.size();i++)
           {               
            totgift+=ThisOppRole1[i].Opportunity.Amount;               
           } 
           Contactdate = ThisOppRole1[0].Opportunity.CloseDate;
           Contact CurrentContact = [select Id,Last_Donation_Date__c,Total_of_all_gifts_given__c  from Contact
           where Id=:ThisOppRole1[0].ContactId];
           CurrentContact.Total_of_all_gifts_given__c=totgift;                         
           CurrentContact.Last_Donation_Date__c=Contactdate;
           update CurrentContact;
  }
}
Thanks,
Ganu
 
  • November 04, 2008
  • Like
  • 0
Hi Sir/Madam,
 
Is it possible in SFDC to change the standard field(Opportunity page) name?
 
There is a Standard field called "Amount" under Opportunity. I need to rename this to "Annual Amount".
can this be achieved by config/s-control or something in SFDC?
 
plz suggest me
 
regards
kaja
  • September 22, 2008
  • Like
  • 0
I am going to need to import Activity information into Salesforce.  I cannot find out how to do this.
Hello,
 
I need help creating a Validation rule between two picklist fields.  Something which says:  If "X" is selected in custom picklist field 1,  then Custom picklist field 2 cannot be blank. 
 
Any help would be much appreciated.
 
Thanks!
  • September 06, 2008
  • Like
  • 0
Hey everybody.
 
We have a custom lookup field on our Account page that is a lookup to other Accounts. At this time, any Account could be selected and saved successfully.
 
I'm looking for a way to only allow Accounts with type "GPO" to save successfully in this lookup field. I was hoping I could do this using a validation rule, but I'm having difficult trying to find what the "Type" field is on the Lookup Account.
 
Does anyone have any suggestions or could point me in the right direction. I thought since it was a lookup field I could use the new Cross-object validation options, but that does not appear to be available for our Account Lookup field.
 
Thanks

I wrote the following code (replaced object/field names for simplicity) to handle rollup summary fields in Apex. It works pretty well but I frequently get errors when operating on bulk records or if no records exist (out of bounds, etc).

ParentObject__c :has_many Objects__c

Can anyone provide input as to whether or not I'm handling this type of task properly?

Code:
trigger rollupTrigger on Object__c (after insert, after update, after delete) {
    
    double totalSum = 0;
  
    Object__c myObjects = trigger.new;
    
    if(Trigger.isUpdate || Trigger.isInsert)
    {
            for(Object__c object : myObjects) //assume more than 1 record in trigger.new
            {
              for(ParentObject__c parent : [select Id, Name from ParentObject__c where Id = :object.Parent_Object__c]) //get the parent object
              {
                for(Object__c childObject : [select Id, Name, Number__c where Parent_Object__c = :parent.Id]) //get all the objects that belong to the parent object
                {
                  totalSum += childObject.Number__c;   //sum the field of choice
                }
                parent.Total__c = totalSum;   //set the total in the parent
                update parent                       // update the parent
              }
            }
    }
    else if(Trigger.isDelete)
    {
        Object__c [] oldObjects = Trigger.old;
        
      for(Object__c oldObject :oldObjects)    //assume deletion of more than 1 record
      {
        for (ParentObject__c parentObject : [select id, Name, Number__c, Total__c where Id = :oldObject.Parent_Object__c]) //get the parent object(s)
        {
          for (Object__c childObject : [select id, Name, Number__c from Object__c where Parent_Object__c = :parentObject.id])   //get the records that belong to the parent
          {
             totalSum += childObject.Number__c;  //sum the fields after a record has been deleted
          }
            parentObject.Total__c = totalSum;   //set new total in parent
            update parentObject;                      //update parent
        }   
      } //end oldObject for loop
    } //end else if
    
} //end trigger

Thanks!
 

I'm trying to get a simple HelloWorld application working on my local machine using the FlexBuilder v3 Beta and the most recent SFC Flex Toolkit. I've followed the code exactly as documented in the samples found online,  various screencasts, and even in downloaded the samples. Now matter what I do, I get the following error in the login step:

[FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] messageId="274B3986-6992-1A79-1276-D7DF53D645C3" type="fault" bubbles=false cancelable=true eventPhase=2]

The login function I'm using is below:
    private function doLogin():void
    {
     var lr:LoginRequest = new LoginRequest();
     lr.username = "devlogin@blablabla.com";
     lr.password = "devloginpassword";
     lr.server_url = "http://www.salesforce.com/services/Soap/u/9.0";
     lr.callback = new AsyncResponder(loginResult, loginFault);
     conn.login(lr);
    }
What am I doing wrong?

Thanks for any help,

Mike