• viruS
  • NEWBIE
  • 324 Points
  • Member since 2013

  • Chatter
    Feed
  • 11
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 143
    Replies
Hi guys,

I'm trying to set up an approval process on new opportunities. The ideal scenario is: after the user fills out all the required information and clicks "Save" button - it'll go straight to the manager for his approval (email notification) and, most importantly, the record isn't created at this stage but only after it's approved. 
At the moment we have a process that just locks the record. 
I'm just wondering if anybody had the same issue and can provide some suggestions?

Thanks,
Anna
Hi,

I have a following requirement for which i need help on it related to chatter post

1) I have enabled the chatter post for opportunity object
My requirment is

whenever i enter some chatter post in opportunity and post it it should capture account id and opportunity id automatically and those ids should be visible in the chatter post to whom i post to.


can it be done through configuration in salesforce ?

Let me know how to achieve this requirement

Thanks in Advance





 
I have a custom object 'CO'. On this I have a standard Name field 'COName' of data type Text(80).
Some of the records on this object have the COName values in the number format '0000'.
Some of them have COName values which include some text in it like 'xxx000000'.
I want the field COName values with only numbers in the field value to change to the format  'xxx000000'.
I tried workflow but it fires only either when record is created or pdated. But I want them dynamically change.
I have nearly 600 records for which this change has to be done. these records have been created from past 5 years.
Can any one help me how to do this either by coding in Visual force or apex or any other way.
Once these changes have been done I am planning to change the data type of this field to Autonumber for maintaining the consistancy.
 Thanks.
Note: I am new to coding. So a detailed explanation with code shall be appreciated.
 
Hi All,

Please help me,
I got the information from linkedin and display it in VF page. but i want store those information in one custom object.

how to do this one ,
please find attached screenshot, here  first page block shows I fetched linkedin information,
second page block i created two custom fields in one custom object.

here there is no relationship between custom fields and linkedin field , please help me how to make relation or how to update custom fields with linkedin information . 

User-added image
Thanks
Satheesh
Hello Everyone,

To simplify, I would like  to create something similar to : a trigger to reverse the "Update Total Inventory When an Order is Placed" at the "Create a Warehouse App" example. That mans, when I delete a Invoice, it would subtract the amount of items on the inventory!
Reference : https://developer.salesforce.com/docs/atlas.en-us.workbook.meta/workbook/workflow_4.htm

Total_Inventory_Quantity  =   Total_Inventory_Quantity - Invoice_Quantity.

I could find something that is similar to what I want, at this post :http://salesforce.stackexchange.com/questions/22967/trigger-to-update-account-running-total-upon-change-to-any-child-custom-invoice, and end up with this code:
 
trigger Cancelar_Item_de_Nota on Itens_da_Nota_Fiscal__c (after delete, before update) {
    if(Trigger.isDelete) //&& (Trigger.isInsert || Trigger.isUpdate)){
       CancelarItemDaNota.atualizarQuantidadeemEstoque();
 
    }
 
public class CancelarItemDaNota {
         public static void atualizarQuantidadeemEstoque() {
  Set<Itens_da_Nota_Fiscal__c> invoices = new Set<Itens_da_Nota_Fiscal__c>();
  Set<Id> accountIds = new Set<Id>();
     List<Item__c> accounts = [SELECT Id, Quantidade_em_Estoque__c, (SELECT Id, Quantidade__c FROM Itens_da_Nota_Fiscal__r) FROM Item__c WHERE Id IN :accountIds];
        for(Itens_da_Nota_Fiscal__c invoice:invoices){
           // accountIds.add(invoice.Item__c);
        }
        for(Item__c acc:accounts){
           // acc.Quantidade_em_Estoque__c = 0;
            for(Itens_da_Nota_Fiscal__c invoice:acc.Itens_da_Nota_Fiscal__r){
                acc.Quantidade_em_Estoque__c -=  invoice.Quantidade__c ;
            }
        }
        update accounts;
    }

}
So,The code runs without any error but field is not updated. Nothing happens. 

Cloud anyone help me on this?

Thanks 



 
ObjectWrapper TmpObjWrap = new ObjectWrapper(Schema.getGlobalDescribe().get(sObjectType).newSObject(), true);

trying to pass the value in "Schema.getGlobalDescribe().get(sObjectType).newSObject()" but it is not working . Please help us

Thank you in advance
Hello All,

 I am capturing the Record ID in a custom text field using a trigger.
 I would like to remove last three digits from the Record ID captured in the field.

 Please find the trigger below.
 
trigger captureID on Multi__c (before update) {
    for( Multi__c mul : Trigger.new){
        mul.Capture_Record_ID__c = mul.id;
    }
}

For the Record - "a0f9000000AHZCr"
Value captured in mul.Capture_Record_ID__c = "a0f9000000AHZCrAAP"

I need to remove AAP from this field.
Please let me know how i should do.

Thanks !

 
How to run the schedule Apex job before 10 days.How to solve the above solution please give some ideas.
I have a scenario where the Edit button was removed on the cases, Now When I do some updates through Inline editing on the cases, case Assignment Rules are not firing.
Hi,
I need to include a pdf document in a visual force page, we have a number of page templates, all in pdf documents, I can upload these as a static resource but then how are they referenced in the visual force markup?

Including imges is easy by using <apex:image . . . but what is the markup for including a pdf?

Thanks is advance,
Mike
 

Hello,

I am looking for resource on internet for combination of apex scheduler and email.

I want to check in Product__c the field end_date__c if the end date is expired then, i want to make checkbox active__c to false..and i also want to realize if the end_date__c is less approaching, it should send email 1 week before to administrator that the product is expiring.

Thanks in advance !

cheers !

  • July 08, 2015
  • Like
  • 0
We are hiring Salesforce Techies (developers with great client facing skills) in Gurgaon. Interested folks, please inbox me your resumes.
  • November 02, 2015
  • Like
  • 0
I have 4 record types ( Business1, Business2, Business3, Business4). I want to prevent users from changing record type to Business4 from any other (Busiess1,2,3)

Please advise. Thanks 

​Banti 
  • August 13, 2015
  • Like
  • 0
Hi guys,

I'm trying to set up an approval process on new opportunities. The ideal scenario is: after the user fills out all the required information and clicks "Save" button - it'll go straight to the manager for his approval (email notification) and, most importantly, the record isn't created at this stage but only after it's approved. 
At the moment we have a process that just locks the record. 
I'm just wondering if anybody had the same issue and can provide some suggestions?

Thanks,
Anna
Here is my test class

Here is my test class
 
@isTest
private class TestAMCLeadCreationBatch {

   static testMethod void myUnitTest() {
       
        list<Lead> tempLead = new list<Lead>();
        list<smagicinteract__smsMagic__c> smsObjectList = new list<smagicinteract__smsMagic__c>();
        
        User u = [Select id
                     from
                     User
                     where
                     name='Balamurugan Nadar'];
        system.runAs(u)
        {    
            Profile p = [select id
                                from
                                Profile
                                where
                                name='BMCC system Admin SSO'];
                                     
             User uBDE = new user(alias = 'test1234', email='test1234@noemail.com',related_team__c = 'BDE', Service_Segment__c ='Compliance Services',
                                emailencodingkey='UTF-8', firstName='Piyush', lastname='Pakhale', languagelocalekey='en_US', MobilePhone='9789654123',
                                localesidkey='en_IN', profileid = p.Id, country='India', Registration__c = true,
                                timezonesidkey='Asia/Kolkata', username='test_g@noemail.com');
            insert uBDE;
            
            Contact tempContact = new Contact();
            tempContact.Salutation='Mr.';
            tempContact.FirstName='Ankit';
            tempContact.LastName='Bobde';
            tempContact.Email='ankit.bobde@bmcgroup.in';
            insert tempContact;

           Operation__c tempOperation= new Operation__c();
            tempOperation.contact__c=tempContact.id;
            tempOperation.Enquiry_for__c='Pvt. Ltd. Registration';
            tempOperation.ROC_Name__c = 'Maharashtra';
            tempOperation.Incorporation_Date__c=system.today();
            tempOperation.Auth_Capital__c=1000;
            tempOperation.Paid_Up_Capital__c=1000;
            tempOperation.Name='BMCTEST';
            tempOperation.New_Company_Name__c='ABC';
            insert tempOperation;
            
            tempOperation.Auth_Capital__c=2000;
            tempOperation.isBulkcreated__c=true;
            update tempOperation;
            
            
            
            for(integer i=0; i<100; i++){
                Lead scheduleLead = new Lead();
                scheduleLead.Enquiry_For__c =  'Pvt. Ltd. AMC';
                scheduleLead.LastName='.';
                scheduleLead.Company='.';
                scheduleLead.ownerId = uBDE.id;
                scheduleLead.Created_Through__c = 'BDE';
                tempLead.add(scheduleLead);    
            
            }
            insert tempLead;
            
       
            test.startTest();
        
            AMCLeadCreationBatch lrbs = new AMCLeadCreationBatch();
            id batchProcessID = Database.executeBatch(lrbs);
        
            test.stopTest();
        }
    }
}

Any Help would be appreciated
 
Hi, I am trying to copy data from Lead to a custom object using javascript button. When a lead rich text field contains line spaces, it gives me an error. So i used URLencode which resolves the error but the spaces are substituted with '+'. Is there a way to copy the text as is (including line spaces)?
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")} 


var p1 = new sforce.SObject("Place__c"); 
p1.Name = '{!Lead.Place_1__c}';
p1.Place_Text__c = '{!URLENCODE(Lead.Place_1_About__c)}';


var result = sforce.connection.create([p1]);


if(result[0].getBoolean("success")){
   alert('New record updated successfully');
}
else{
  alert('Error : '+result);
}

example:
Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro v v v vPlace 1 Intro Place 1 IntroPlace 1.

Intro Place 1 Intro Place 1 Intro. Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro Place 1 Intro v v Place 1 Intro

gets converted to

Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+v+v+v+vPlace+1+Intro+Place+1+IntroPlace+1.%3Cbr%3E%3Cbr%3EIntro+Place+1+Intro+Place+1+Intro.%C2%A0Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+Place+1+Intro+v+v+Place+1+Intro
  • August 12, 2015
  • Like
  • 0
Hi all,

Currently we have a standard matrix drill down report which shows data even more than 1 millions of records. Because my client wants to see the columns dinamacally based on some data for the parent object, I will need to change from standard report to a custom report build on Visualforce page. I am worry of the amount of records because the object migt be have more 1m of records and will be a little bit chaotic to lead with the govern limits in Salesforce.

Any insight or suggestion based on your experienced you can share with me ?

Many thanks for your help. 
Hi,

I am trying to insert a new Territory into Salesforce Territory using WSDL. It is giving me [ { "message" : "unexpected token: INSERT", "errorCode" : "MALFORMED_QUERY" } ]  error.

Please help me as I am new to Salesforce CRM.
Hi, 

Since the modification eu1 -> eu4 Saturday, I can't call a WSDL through a web application that worked very well before that.
The error message is : INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

I had few hardcoded references to EU1 and I have changed them to Eu4.

In the connection history, I see that the connection has passed and nothing after that happens even  in the debugs log.

Thanks for your help
I’m using “SingleEmailMessage” api to sending an email but activity is not logging when we set “setSaveAsActivity” attribute true. It is throwing an exception i.e. “System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Priority]: [Priority]”. Same piece of code working all the other classes but throwing an exception for a specific class. I’m using below code.

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setTargetObjectId('003o000000KWuRu');
mail.setSenderDisplayName('SalesforceLogin Test');
mail.setSubject('Subject Test1234');
mail.setSaveAsActivity(true); //add mail to the activity history
mail.setBccSender(false);
mail.setUseSignature(true);
mail.setHtmlBody('Hi! Salesforce user');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
Hi All,

I have an requirement where i have an object X__c and checkbox fields as C1__c, C2__c, C3__c. Whenever i click checkbox C1__c then dynamically it will display one upload browse button near that checkbox field. Whenevr i will uncheck the browse button will disapper. 

And 2nd one is i can upload more than 15mb file and less than 25 mb.

Can anyone share some sample code.

Regards
MY REQUEST
http://158.69.22.40:8001/addressValidator/AddressValidation/Address?username=mule&password=mule&address1=123 FIVE DOCK&address2=NSW 2046&address3=null

This is my http request,I need to give the Address,Subrub,post code,so i given dynamiccally

                   String serviceURL='http://158.69.22.39:8001/addressValidator/AddressValidation/Address?username=mule&password=mule&address1='+address1+'&address2='+address2+'&address3='+address3;
 
@Future(callout=true)  
   public static void callPostAdressAPI(Id contactId) {
    /*
        @contactId - Id of the contact to be sent for Verification API.
    */
        System.debug('ContactVerificationAPICaller.callPostAddressAPI started.');
        
        try {
            List<Contact> listContact = [
                select
                    Id,
                    Postal_Address__c,
                    Postal_Address_Country__c,
                    PostalDPID__c,
                    Postal_Address_Postcode__c,
                    Postal_Address_State__c,
                    Postal_Address_Suburb__c,
                    Postal_Address_Invalid__c 
                    from Contact
                    where id = :contactId];
                    
            if (listContact.size() == 1 ) {
                // Object of the action.
                Contact contactResult = listContact[0];
                
               String PostalDPID,Dpidvalue;   
            
               System.debug('contactResult.Postal_Address_Suburb__ccontactResult.Postal_Address_Suburb__c'+contactResult.Postal_Address_Suburb__c);
               System.debug('contactResult.Postal_Address_State__ccontactResult.Postal_Address_State__c'+contactResult.Postal_Address_State__c);       
               System.debug('contactResult.Postal_Address_Postcode__ccontactResult.Postal_Address_Postcode__c'+contactResult.Postal_Address_Postcode__c);    
               System.debug('contactResult.Postal_Address__ccontactResult.Postal_Address__c'+contactResult.Postal_Address__c); 
               
                   String address1=contactResult.Postal_Address__c;
                   
                   String address2=contactResult.Postal_Address_State__c+' '+contactResult.Postal_Address_Postcode__c;
                   String address3=null;
                   System.debug('Address 1 :'+address1);
                   System.debug('Address 2 :'+address2);
                   System.debug('Address 3 :'+address3);
                   String serviceURL='http://158.69.22.39:8001/addressValidator/AddressValidation/Address?username=mule&password=mule&address1='+address1+'&address2='+address2+'&address3='+address3;
                  
                   Http httpClient=new Http();
                   HttpRequest req = new HttpRequest();
                   req.setEndpoint(serviceURL);
                   req.setMethod('POST');
                   req.setHeader('Content-Type', 'multipart/form-data');
                   req.setBody(' ');
                   HttpResponse res = httpClient.send(req);
                   System.debug('Response : '+res.getBody());
                    String soapResponse = res.getBody();
                    DPIDParser cls=new DPIDParser();
                    DPIDParser parsedResponse =cls.parse(soapResponse); 
                  
                    if(parsedResponse != null) {
                        PostalDPID = parsedResponse.DPID;
                        contactResult.PostalDPID__c = PostalDPID;
                    }
                  
                    if(PostalDPID == '' || PostalDPID == ' ' ) {
                        contactResult.Postal_Address_Invalid__c= true;
                    } else {
                        contactResult.Postal_Address_Invalid__c= false;
                    }
                 
            
              update contactResult;
                
            } 
        }catch (Exception ex){
            System.debug(ex);
        }
        System.debug('ContactVerificationAPICaller.callPostAdressAPI finished.');
    }

 
Hello,

I am creating a web-to-case form containing several picklist which have a lot of different possible values and are dependant from each others.
I have therefore two questions:

1. Is it possible to update automatically the values available in the picklist? Meaning that if I modify the values in Salesforce, it will be modified automatically in the web form to? Maybe by autopopulating the picklist each time it opens instead of having its values written in the code?

2. Is it possible to put the dependencie rules of the picklists in the form without needing to write them in the code? And to update them when they are modified on Salesforce?

Any suggestions?

Thanks,
Constance
HI All ,
I have created one login page ,now i would be given the session to the page  after 10 mins it goes to session expire (Logout)? 

How to we will write the code in va page and apex class , please help me any one  .


Thanks,
Viswa 
I am getting an install error while trialing Salesforce Enterprise. 

Installing this package requires the following feature and its associated permissions: Apex Classes.  The Wrike Install Package can not be installed. "Apex Classes (classes/Wrike_RemoteSettingsController.cls) Missing feature. Install this package requires the following feature and tis associated permissions: Apex Classes.

What do I need to do to solve this Apex Classes issue?
Here is the install process procedure that Wrike asked me to do. Pretty straight forward. All I need is to have Apex Classes be installed with permissions.

This section is from Wrike customer service helping me with this integration:

Here is the install process procedure that Wrike asked me to do. Pretty straight forward. All I need is to have Apex Classes be installed with permissions.

This is Olga from Wrike support. Charles has prompted your request so we helped you set up the Salesforce integration. Let me provide some details about it.

To get a basic overview of this integration, please visit our our help page https://www.wrike.com/help/salesforce/. Please keep in mind that our current integration with Salesforce is an unmanaged package utilizing Salesforce API, and such packages can be installed in the Enterprise Salesforce edition and higher.

If you have the rights to install packages in Salesforce, you can proceed with the installation. You can test-run the integration in your Sandbox environment in Salesforce (SF) prior to deploying it to production but it is not critical. Here are the installation links:

Sandbox - https://test.salesforce.com/packaging/installPackage.apexp? p0=04tj0000001aOGn

Production - https://login.salesforce.com/packaging/installPackage.apexp? p0=04tj0000001aOGn

And here's a setup manual with step by step guidance on how to proceed:

https://cdn.wrike.com/resources/Wrike_Salesforce_Integration_Manual.pdf

The registration is performed in an automated regime (the email with Wrike keys should be sent automatically). Also keep in mind that you need to have user license in relevant Wrike account to be able to activate and share access to the integrated data with other team members.




 
Hi folks,

I was having a bit of difficulty figuring out how to implement an integration and I was hoping someone might have some insight. What I need to to is make an HTTPS callout from SFDC to another system where there system is expecting an incoming XML file where the connection is secured with SSL and they provide SSL files. I am unaware of how to use their SSL files within SFDC and my APEX code. I have seen plenty of discussions of how to generate SSL certificates in SFDC but I assume that I should just be using theirs and I am not sure how. I have also seen many examples going from an external source and posting in to SFDC but not much the other way around. I have also seen that this may be how to use it in APEX once it is generated but that same material only explains how to create it in SFDC, not how to use a provided certificate.
 
req.setClientCertificateName('DocSampleCert');


below is my current code which is hitting their server but returning an unauthorized 401 error. Sensitive or unnecessary parts have been changed/removed.
 
@future (callout=true)
public static void basicAuthCallout(String name, Id id){
system.debug('point 3');
String xmlToEscape = '<?xml version="1.0" encoding="UTF-8"?>' +
'<PartnerRecord version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PartnerXml.xsd">' +
'<PartnerId>' + id + '</PartnerId>' +
'<OrgCode></OrgCode>' +
	'<CompanyCode></CompanyCode>' +
'<Name>' + name + '</Name>' +
// unnecessary parts of XML string removed
'</PartnerRecord>';

String xmlToSend = xmlToEscape.escapeXml();
HttpRequest req = new HttpRequest();
req.setEndpoint('https://example integration endpoint URL');
req.setMethod('POST');

// Specify the required user name and password to access the endpoint 

// As well as the header and header information 


String username = 'exampleUserName';
String password = 'examplePassword';

Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'BASIC ' +
EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
req.setBody(xmlToSend);
// Create a new http object to send the request object 

// A response object is generated as a result of the request   


Http http = new Http();

HttpResponse res = new HttpResponse();
try {
           res = http.send(req);
   } 
   catch(System.CalloutException e) {
       System.debug('Callout error: '+ e);
       System.debug(res.toString());
   }
   
   
//HTTPResponse res = http.send(req);
System.debug(res.getBody());
}
and here is the info that I got from the 3rd party as well as 2 zip files:

Please find the following information related to our SSL certificates and authentication:
 ______________________________________________________________________________________________
Attached are the certificates:
 
STAR.MANAGEMENTDYNAMICS.COM.zip: This has a wild card certificate; like: *.managementdynamics.com. It works for both eoduat (test) and eod (production).
root-intermediate-certificates.zip: This has three certificate files; one root and two intermediate 
Notes:
Our certificates are issued by:

Network Solutions CA company
Network Solutions CA company gets their certificate signed from UTN-USERFIRST CA company
UTN-USERFIRST CA company gets their certificate signed from AddTrustExternal CA  (this is root CA) 
In order to make a secured connection, your certificate store must have intermediate & root certificates. If you already have these, there is no need to import them. 
The Actual SSL Certificates in STAR.MANAGEMENTDYNAMICS.COM.zip are valid until 01/16/2018. 
Our servers do not support non-SSL connections. While sending the inbound XML request, you have to set the Authorization HTTP header in the following format in order to successfully logon (Reference Section 3.1.3, page 28 of Integration guide): 
Basic<Space><Base 64 Encode(UserName:Password)>
 
Be sure to post your files to the correct URL based on whether you want to send to the test or the production environment, and be sure you use the correct UserName and Password for each environment.
 ______________________________________________________________________________________________


finally, a slightly off topic question, I have set them up as a remote site but I just used the base URL of their company, I did not include the application context after the .com that I use for the endpoint connection. Is this correct or do I put the whole endpoint connection for the remote site? Anyway, any ideas or suggestions would be greatly appreciated. Thanks!




 
How to insert multiple remote site settings through apex class.please sare the sample code plz--------------------


Regards
Raj
Hi

i need java to salesforce rest api integration step by step .please any one share the sample code please.


Thanks
Raj