• Vamshi Krishna
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 9
    Replies
Hello guys,
My batch apex callout class has a a weird error when trying to validate in Production. It says "Your code coverage is 70%. You need at least 75% coverage to complete this deployment".
The code coverage is 98% for this test class but still it shows this error. Also, my Prod Org has 66% overall code coverage.I cannot relate or figure out what the  issue is. Please help.
Sounds weird but my question is.....

Suppose an Organisation has Customer Community Plus,Customer Community Plus Login licenses earlier. Administrator assigned users covering those licenses. Now due to some financial  issues,ORG cut down those Customer Community Plus Login licenses(assume there are almost 100 users with this license). But the administrator can still see those Community Plus Login users can log in to the community. Company Information do not show Customer Community Plus login license details anymore.What's the issue might be? I'm not sure which category this fall into
Like I need 8000 records to be updated with the information from  a repository. How can we acheive it?
I have a form (record) that needs to get locked except for the sys admin once the field changes to "approved" or etc.. The scenario is they have to pay for the form once it is approved. We have a formaula field which acts like a button to a visualforce page for payment. 
-I wrote a validation rule which unlocks the record once it's status changes to certain value.
  AND( 
$Profile.Name <> 'System Administrator', 
$Profile.Name <> 'Agent Manager', 

NOT(ISCHANGED(Status__c)), 
OR( 
ISPICKVAL(Status__c, 'Approved'), 
ISPICKVAL(Status__c, 'Denied'), 
ISPICKVAL(Status__c, 'AM Approved') 

)

How to exclude one field from it? Like formual field"Payment" from it.
Apex call out has an xml response.How can I map the fields in Salesforce to the response I receieved. I could map the fields like clean etc. But how could I map fields like make,model, year relatively.
Assume the fields are : Make__c ,Model__c etc.... Considering the XML response.
XML response is:
<?xml version="1.0" encoding="UTF-8"?> <result> <vin>xxxxxxxxxxx</vin> <id>xxxxxxxxxxx</id> <date>2018-02-08 05:02:15 PST</date> <specs> <VIN /> *<Year>2011</Year> <Make>Chevrolet</Make> <Model>Suburban</Model>* <Trim>LS 1500</Trim></specs><clean>0</clean> <success>1</success> <error /> </result>



Apex callout:

 
public PageReference doVinExtract()
    { 

            HttpRequest httpRequest = new HttpRequest();
            httpRequest.setEndpoint('https:/VinProviderxxxx.php');
            String body = 'id=01123999999198&key=xxxxxxx&vin=1GNSKHE34BRxxxxxxx&mode=test&user=vxxxxxx&pass=slll4250&format=xml';
            httpRequest.setBody(body);
            httpRequest.setMethod('GET');
            Http htt = new hTTP();
            HttpResponse httpRe = htt.send(httpRequest);
            system.debug(httpRe.geTbody());
            String re = httpRe.geTbody();

            Dom.Document doc = httpRe.getBodyDocument();
            Dom.XMLNode address = doc.getRootElement();


        String vinDate= address.getChildElement('date', null).getText();

       String state = address.getChildElement('specs', null).getText();
        // print out specific elements

        System.debug('address: ' + address);
          System.debug('state: ' + state);



            system.debug('result'+re);


             for(Dom.XMLNode child : address.getChildElements()) {
             if(child.getName() == 'specs'){
           System.debug('******'+child.getText());
           }
        }
 I was struck and could not map these three fields:
*<Year>2011</Year> <Make>Chevrolet</Make> <Model>Suburban</Model>
              to the fields in salesforce.
 
Currently we have a payment processor in Salesforce. I like to have a visualforce page on SITES (with a login ID and a password in order to access the page).The requirement is :
We will have product requests and those are  set up by internal users from Salesforce. For those products,The status will be new by default. When the product request is approved, the customer should get a notification email that includes the url which directs them to site.com(Visualforce page).

(Customer)----Internal User-----Creates---| Request created as a record in Salesforce|------Approved-----                it gets approved, the email  should include a url to the restricted page-||--   àLater once payment is done it should be stored as record in SF
 The salesforce user is good and we can store the Transaction ID as a record related to that request ID.                                                               


Hoping eagerly for a solution. Thanks.
Hello all,
We are a Taxicab Organisation.  My organisation stores information about all taxicabs in an object. It includes VIN,make model etc. We are looking for an integration with Carfax/Vina udit or...any company that provides the API. The company should provide reports of vehicle history. 


My requirement is.. when we are saving a new record of a vehicle the fields like make,model of the vehicle  and title should be auto populated based on the VIN of the vehicle. Is this possible? Any suggestion is greatly appreciated.
When the record gets updated,it should have effect(true or false) on the other object.Please help 



 if (Trigger.isAfter) {
     list<string> pvinUpdate = new list<string>();
     list<string> pvinUpdateRemove = new list<string>();
     
     
      for (Vehicle__c venNew: Trigger.new) {
      
      Vehicle__c venOld = Trigger.oldMap.get(venNew.Id);
      
      if(venNew.PVIN__c != venOld.PVIN__c){
      
       pvinUpdate.add(venNew.PVIN__c);
       pvinUpdateRemove.add(venNew.PVIN__c);
      
      }
      
      
      }
      
     // if(pvinUpdate.size()>0){
          
         list<PVIN__c> lstvenup = [SELECT Id, Name, In_Use__c FROM PVIN__c WHERE Name IN: pvinUpdate];
     
         for(PVIN__c p : lstvenup){ 
             p.In_Use__c = false;
         }
         
         update lstvenup; 
          
          
   //   }
      
      
      if(pvinUpdateRemove.size()>0){
          
         list<PVIN__c> lstvenuprem = [SELECT Id, Name, In_Use__c FROM PVIN__c WHERE Name IN: pvinUpdateRemove];
     
         for(PVIN__c pr : lstvenuprem){ 
             pr.In_Use__c = true;
         }
         
         update lstvenuprem; 
          
          
      }
      
      
     }
     
Consider Account(std object),Vehicle(custom object-lookup to account) and forms(another custom object- loookup to account).There is a field on custom object Vehicle called "Expiration date". Customers will apply for a form once their vehicles gets expired to get renewed. The forms are shared to account and vehicles(sharing rule).I want to send an email alert  to a team (details of vehicle) when the vehicle gets expired and didnot apply for renewal. Bit confused but can we do this? Batch class or trigger?
My Organization deals with Comapnies and Vehicles. All vehicles are associated with companies and shared with a sharing rule. Few days ago,because of a small issue, I did a mass update of all vehicles with companies.Like I had a refernce company and mass updated all vehicles with that and later updated with the original companies.This is to make the community users see their vehicles on community.The vehicles is now shared with other additional company which I do not like to see.Now all vehicles are associated with one other additional company besides the original. The Sharing is "Manual". Is there a way to remove manual sharing in particular for all these vehicles ? Like removing the role ID etc.Any other suggestion is gladly appreciated.
 
Hello ,
I'm trying to integrate Salesforce with Paypal Payflow Pro. My Organisation has communities like Driver Portal(free registration)and Company Portal. Driver Portal,where a cab driver registers and applies for an application to renew or hire a cab with a payment. We are trying to introduce a payment option online.As we already have a Paypal Merchant account which is used for in other departments, I'm trying to integrate Salesforce with Paypal Payflow pro(only the gateway since our Organisationis using it). The workflow is Salesforce--Payment Page(Visualforce page within the Salesforce)--Endpoint.
  Usually,I assumed the endpoint is the Paypal Manager Account with API credentials. When I have gone through the PAyflow developer guide, I was confused with the configuration set up. The Processor is FDMS NASHVILLE with which we have a merchant account. IF I click payment button, it should display a payment page and when a user enters the card details and clicks on PAY it should give a response and the amount should be credited to the account. This is my scenario and any modified assistance is appreciated.How to call API's in code ? Any modifies set up process is appreciated. Chargent package is ignored too.
  We're using  web-to-case form submission system from our site.aAfter we submit it to SFDC it redirects the user's browser to a page we specify(i.e., the site page itself).Is there any work around or process to get the Case number after its submission on the site? Is it possible?

       I know Web to case is asynchronous.With the existing system,the customer can get an email after the submission. Need ideas.
We have a Company portal called " XXXX Company Portal."Here, the company agent logs in and checks all his authorized records(drivers,vehicles and cases which were only assigned to that particular company). We have many companies with vehicles, drivers etc. All the other companies are able to access their only records shared with them(sharing rules). there is certain company that is able to see every record in our organization which we are not comfortable with. While the other companies are able to see the object records shared , I'm unable to understand why this particular account able to see everything.Initially,we had every vehicle under this account,but we updated them eventually to other companies. With the sharing rules, they were set to private
I have a custom object "vehicles" which are shared to Accounts.Sharing rule has been set to a particular ole who is a contact.An apex class has been set to ensure the records of the Object " vehicles" are shared with concerning contact on account.
  When the contact logs into Community portal, he can see the records of the object accordingly. This was set up an year ago and works fine. But recently, I could not see the records when I log in as a contact in portal. I saw the permissions are all same too. My question is to figure out where could be the issue? Could someone please help.

I have and PHP code for integrating with Pay Pal Payflow. Anyone who can give me its APEX alternative or convert the code into apex. Iwill be thankful.


<?php
session_start();
global $environment;
$environment = "sandbox";

require_once('PayflowNVPAPI.php');

echo '<p>Payflow direct credit card processing - basic demo</p>';
if(empty($_POST)) {

?>
<form method="post">
  Manager:
  <br/>Partner: <input type="text" name="PARTNER" value="PayPal"/>
  <br/>Vendor: <input type="text" name="VENDOR" value="goofy2000us"/>
  <br/>User: <input type="text" name="USER" value="PayFlowPro"/>
  <br/>Password: <input type="text" name="PWD" value="test1234"/>
  <br/>
  <br/>Amount:<input type="text" name="AMT" value="1.23"/>
  <br/>Credit card:<input type="text" name="CREDITCARD" value="5105105105105100"/>
  <br/>Expiration date: <input type="text" name="EXPDATE" value="1220"/>
  <br/>Card security code: <input type="text" name="CVV2" value="123"/>
  <br/>CURRENCY: <input type="text" name="CURRENCY" value="USD"/>
  <br/>First name: <input type="text" name="BILLTOFIRSTNAME" value="John"/>
  <br/>Last name: <input type="text" name="BILLTOLASTNAME" value="Doe"/>
  <br/>Address: <input type="text" name="BILLTOSTREET" value="123 Main St."/>
  <br/>City: <input type="text" name="BILLTOCITY" value="San Jose"/>
  <br/>State: <input type="text" name="BILLTOSTATE" value="CA"/>
  <br/>Zip: <input type="text" name="BILLTOZIP" value="95101"/>
  <br/>Country: <input type="text" name="BILLTOCOUNTRY" value="US"/>
  <br/>Silent Tran: <input type="text" name="SILENTTRAN" value="TRUE"/>
  <br/>Secure ID: <input type="text" name="createsecuretoken" value="Y"/>
  <br/><input type="submit" value="Pay Now"/>
</form>
<?php

} else {
  $request = array(
    "PARTNER" => $_POST['PARTNER'],
    "VENDOR" => $_POST['VENDOR'],
    "USER" => $_POST['USER'],
    "PWD" => $_POST['PWD'], 
    "TENDER" => "C",
    "TRXTYPE" => "A",
    "CURRENCY" => $_POST['CURRENCY'],
    "AMT" => $_POST['AMT'],

    "ACCT" => $_POST['CREDITCARD'],
    "EXPDATE" => $_POST['EXPDATE'],
    "CVV2" => $_POST['CVV2'],

    "BILLTOFIRSTNAME" => $_POST['BILLTOFIRSTNAME'],
    "BILLTOLASTNAME" => $_POST['BILLTOLASTNAME'],
    "BILLTOSTREET" => $_POST['BILLTOSTREET'],
    "BILLTOCITY" => $_POST['BILLTOCITY'],
    "BILLTOSTATE" => $_POST['BILLTOSTATE'],
    "BILLTOZIP" => $_POST['BILLTOZIP'],
    "BILLTOCOUNTRY" => $_POST['BILLTOCOUNTRY'],

  );

  //Run request and get the response
  $response = run_payflow_call($request);

  pre($request, "Request");
  pre($response, "Response");
}
My Organization deals with Comapnies and Vehicles. All vehicles are associated with companies and shared with a sharing rule. Few days ago,because of a small issue, I did a mass update of all vehicles with companies.Like I had a refernce company and mass updated all vehicles with that and later updated with the original companies.This is to make the community users see their vehicles on community.The vehicles is now shared with other additional company which I do not like to see.Now all vehicles are associated with one other additional company besides the original. The Sharing is "Manual". Is there a way to remove manual sharing in particular for all these vehicles ? Like removing the role ID etc.Any other suggestion is gladly appreciated.
 
Apex call out has an xml response.How can I map the fields in Salesforce to the response I receieved. I could map the fields like clean etc. But how could I map fields like make,model, year relatively.
Assume the fields are : Make__c ,Model__c etc.... Considering the XML response.
XML response is:
<?xml version="1.0" encoding="UTF-8"?> <result> <vin>xxxxxxxxxxx</vin> <id>xxxxxxxxxxx</id> <date>2018-02-08 05:02:15 PST</date> <specs> <VIN /> *<Year>2011</Year> <Make>Chevrolet</Make> <Model>Suburban</Model>* <Trim>LS 1500</Trim></specs><clean>0</clean> <success>1</success> <error /> </result>



Apex callout:

 
public PageReference doVinExtract()
    { 

            HttpRequest httpRequest = new HttpRequest();
            httpRequest.setEndpoint('https:/VinProviderxxxx.php');
            String body = 'id=01123999999198&key=xxxxxxx&vin=1GNSKHE34BRxxxxxxx&mode=test&user=vxxxxxx&pass=slll4250&format=xml';
            httpRequest.setBody(body);
            httpRequest.setMethod('GET');
            Http htt = new hTTP();
            HttpResponse httpRe = htt.send(httpRequest);
            system.debug(httpRe.geTbody());
            String re = httpRe.geTbody();

            Dom.Document doc = httpRe.getBodyDocument();
            Dom.XMLNode address = doc.getRootElement();


        String vinDate= address.getChildElement('date', null).getText();

       String state = address.getChildElement('specs', null).getText();
        // print out specific elements

        System.debug('address: ' + address);
          System.debug('state: ' + state);



            system.debug('result'+re);


             for(Dom.XMLNode child : address.getChildElements()) {
             if(child.getName() == 'specs'){
           System.debug('******'+child.getText());
           }
        }
 I was struck and could not map these three fields:
*<Year>2011</Year> <Make>Chevrolet</Make> <Model>Suburban</Model>
              to the fields in salesforce.
 
  We're using  web-to-case form submission system from our site.aAfter we submit it to SFDC it redirects the user's browser to a page we specify(i.e., the site page itself).Is there any work around or process to get the Case number after its submission on the site? Is it possible?

       I know Web to case is asynchronous.With the existing system,the customer can get an email after the submission. Need ideas.
I have a custom object "vehicles" which are shared to Accounts.Sharing rule has been set to a particular ole who is a contact.An apex class has been set to ensure the records of the Object " vehicles" are shared with concerning contact on account.
  When the contact logs into Community portal, he can see the records of the object accordingly. This was set up an year ago and works fine. But recently, I could not see the records when I log in as a contact in portal. I saw the permissions are all same too. My question is to figure out where could be the issue? Could someone please help.
Hi,

I want to integrate the payment gateway in salesforce. When a user clicks on the 'Credit Card' button on visualforce, a new window (iFrame or Canvas app, which one is better?) should open which will display the page provided by our payment team. The customer details should  be auto-populated and only card details should be entered. Once user hits 'Submit' button, the payment should be processed and I should be able to capture the response (get the unique refrence number) and store the same in my payment record.

Please let me know:
1- How to launch the new window - iFrame or Canvas app, which one is more secure and seamless, i think its canvas app
2- How to send/capture the request/response if I am using a Canvas app

Appreciate any help here.
Hi ,

I am new to SFDC and i need to know to show or hide a custom button based on the status field value.
I have created a custom button "Test" on custom object "Offer". When staus is New, the test button should be hidden . How can this be acheived.

Regards,
Pallavi
  • May 12, 2016
  • Like
  • 0

Hi,

 

Has anyone is having experience on Salesforce integration with PayPal Using PayFlowPro gate way?

I want to do integration using HTTPS request.

I am new to Integartion. Can anyone plz suggest any link or source code?

 

Regards,

Nilesh.