• Raghu Reddy 14
  • NEWBIE
  • 35 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 12
    Replies
Hi friends


I am using 3rd party tool (Task Factory) to updated some of the field value with new value. Now I need to report how many records it updated.
is there some function that gives the number updated/effected.
in sql server we have @@rowcount  which gives the number of record get updated, I am looking smiliar thing in SF

Thanks for the help
Which licenses allow the use of content libraries? Can a Force.com or Partner Community user access it?
Hi Buddies,

I have a requirement like i want to display all the chatter feed for a record in visualforce page. Mainly it is for to take the printout, so can anybody suggest me how to get the data in visualforce page and how to show it in print-out.
 

So after all that work when i try to do an update to the records in my address object im now getting a duplicate error: 

 

system.listexception: duplicate id in list: 003400000cWe1BAAS trigger.mainshiptoaddressTrigger: line 29, column 1

 

Seems it does not like my update statement....
trigger mainShipToAddessTrigger on ShipTo_Address__c (before insert, before update) {
   List<ShipTo_Address__c> slist = new List<ShipTo_Address__c>();
   List<Contact> contactsToUpdate = new List<Contact>();
   for ( ShipTo_Address__c s : trigger.new ) { 
       if ( s.Primary_Billing_Address__c == true) {
           Contact c = New Contact(Id = s.Contact__c);
           system.debug('***** UPDATING:'+c.Id+' '+s.Address__c+' '+s.City__c);

           c.MailingStreet = s.Address__c;
           c.MailingCity = s.City__c;
           c.MailingState = s.State__c;
           c.MailingCountry = s.Country__c;
           c.MailingPostalCode = s.ZIP__c;
     contactsToUpdate.add(c);
   //        update c;             
       }
       if ( s.Default_Shipping_Address__c == true) {
           Contact c = New Contact(Id = s.Contact__c);
           system.debug('***** UPDATING:'+c.Id+' '+s.Address__c+' '+s.City__c);

           c.OtherStreet = s.Address__c;
           c.OtherCity = s.City__c;
           c.OtherState = s.State__c;
           c.OtherCountry = s.Country__c;
           c.OtherPostalCode = s.ZIP__c;
           contactsToUpdate.add(c);
  //         update c; 
       }
      update contactsToUpdate;
   }  
}


I have the following code in a class below:

User u = [SELECT RepName__c FROM User WHERE Id = :UserInfo.getUserId()];
        List<String> zipcodes = new List<String>();
        //create map to track updated zips within execution context
        Map<Id,Zip_Code_Availability__c> zipToUpdate = new Map<Id,Zip_Code_Availability__c>();
        for(Zip_Code_Availability__c z :newlist) {
            if(newmap.get(z.id).Lock_Zip__c == 'Lock' && oldmap.get(z.id).Lock_Zip__c !='Lock' && !zipToUpdate.containskey(z.Id)) {
                z.CalloutPending__c = true;
                z.Lock_Zip_Requested_By__c = u.RepName__c;
                z.Lock_Zip_Date_Time__c = datetime.now();
                zipToUpdate.put(z.Id,z);
            } else {
            [...]
            }
       }

For some reason when I do a mass update with dataloader (I've tested with 1000+ records), datetime.now() populates with a random datetime sometimes in the past sometimes in the future, but different for all records.  Also, the User returned with the soql query in the top row is not myself even though I'm logged into DataLoader.  

Any ideas as to why it would do this? Let me know if you need me to post the whole code for context.  Thanks for any help you can offer. 
Hi,

Please advise.I am trying to test query operation of REST API using SOAP UI.I am getting below error:
<h2>HTTP ERROR 405</h2>
      <p>
         Problem accessing /services/Soap/c/31.0/query/. Reason:
         <pre>GET not supported</pre>
      </p>
      <hr/>
      <i>
         <small>Powered by Jetty://</small>

In the SOAP UI,I am manually adding header with name "Authorization" with value of sessionID.Below us the url I am trying for query

https://instance.salesforce.com/services/Soap/c/31.0/query/?q=SELECT ID,name from Account

Are there any samples,if yes please provide the link and advise.Thanks in advance!!
Hi

I am trying to validate the input text field given by user if it contains 'test' in its name.If so then when user clicks save button,record has to be saved by getting data  from existing record on which button is clicked and clone the record(Not all fields.Some fields should be different)

If the userinput doesnt contain 'test ' then itt  haas to show an error saying to enter corrrect name when he clicks on 'save'.

Please suggest some way .

I am not able to get ID of record on which VF page is opened.

Please help.Need this ASAP!!!!

I am running all test classes (excluding components from Manage Package) and getting 72% coverage. However when i am trying to validate a code deployment from Full Sandbox through Eclipse, i am not getting any error related to code coverage governor limit (which is 75%).


I have written this code but its not taking

String phoneNumber = eachMob.Contact_Number_Mobile__c;
        Pattern isnumbers = Pattern.Compile('^[0-9]+$');
           Matcher MobileMatch = isnumbers.matcher(phoneNumber);

             if(MobileMatch.Matches())
Hi friends


I am using 3rd party tool (Task Factory) to updated some of the field value with new value. Now I need to report how many records it updated.
is there some function that gives the number updated/effected.
in sql server we have @@rowcount  which gives the number of record get updated, I am looking smiliar thing in SF

Thanks for the help
Hi,
I am creating a visual force email template and I need to format the dates. At the moment my code looks like:
<p>Date Actual Invoice Required:{!relatedto.Date_Actual_Invoice_Required__c}</P>
<p>Date proforma invoice required: {!relatedto.Date_Actual_Invoice_Required__c} (</P>

The date is in the format Wed Aug 20 00:00:00 GMT 2014.
I would like to Day Month Year format please, can you tell me how to do this?
thanks in advance