• amidstcloud
  • NEWBIE
  • 55 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 11
    Questions
  • 57
    Replies

Hi,

 

 I have a wrapper class for which i have written a test class for it, i need some help to cover certain methods in the class which i am experiencing difficulty

 

i have written the methods as follows,

 

// methods need help(warpper class)

public class PdfWrapper{
        public Call_Report__c cr{get;set;}
        public List<PADetails> pernAcctList{get;set;}
        public List<PADetails> pernAcctList2{get;set;}
        public Call_Item__c callitemList{get;set;}
        public List<Customer_Brand__c> customerbrndbbl {get;set;}
        public String baId{get;set;}

 

// method help

 

public class PADetails{
        public List<Contact> cclist{get;set;}
        public String paName{get;set;}
        public String paaccName{get;set;}
        public String paJobTitle{get;set;}
        public String paLastvisit{get;set;}
        public String paBrand1{get;set;}
        public String paBrand2{get;set;}
        public String paBrand3{get;set;}
        public String callObjective1{get;set;}
        public String callObjective2{get;set;}
        public String crdate{get;set;}
    }

 

//Fetching all the person account headers and details dynamically
            PADetailsList=new List<PADetails>();           
            PADetails paDetHeader=new PADetails();
            paDetHeader.paName='Name';
            paDetHeader.paJobTitle='Job Title';
        
           
            if(crList!=null && crList.size()>0 && crList.get(0)!=null && crList.get(0).Date__c!=null){
                paDetHeader.crdate='Time';     
            }else{
                paDetHeader.crdate='';    
            }

 

Thanks in advance

 

 

 

 

Hi,

 

Do governor limits apply when i use a insert using a list.

 

For eg. i add all the records to be inserted in to a list and finally give a insert list. I might have 3000 records in the list

Does it take as one DML statement or does it take as 3000 DML statements?

 

Thanks

 

  • December 15, 2011
  • Like
  • 0
I have tried using the <lightning:recordEditForm> component in a component with version 41, however it is still throwing the below error. 


User-added image
Hi Team . . 

I have a java program to create contact in salesforce through Standard URL to create records.  I am sending the request in JSON and expecting a response in JSOn . though I am getting weird response. 
 
{"id":"0031700000469cYAAQ","success":true,"errors":[]NULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULL }"id":"0031700000469cYAAQ","success":true,"errors":[]
What is the best to parse the response in JAVA. and why is thie weird response is coming from SFDC..
 
Hi Team , 

I have a quick question. Do I need to install the APEX data loader ? Can't I use the dataloader-25.0.1-uber.jar directly ?  One more thing , Can we set up it in UNIX. 

Thanks . 
hello friends

I got an requirement to integrate Sf with Oracle. I have been asked to integrate with Oracle Fusion. I don't know how it works with Fusion .

I have to do a bi-directional real time integration. Does it work. I am assuming that they will provide me an WSDl to consume and make a callout. And , even they want to update something in SFDC , then i have create a method and generate wsdl for oracle.

please advise.
Hi All,

Can we create downloadable app with HTML 5.  I have seen the WEB APP exmaple (hosted on Heroku) wiht HTML5.  How can I create a mobile app with HTML 5 can be download/install on phone . thanks.

When I am performing RUN ALL Test in my Org.  I m getting the below Issue. 

 

Failure Message: "System.LimitException: Attempted to schedule too many concurrent batch jobs in this org (limit is 5).", 

 

I am having a quite number of batch Apex test class.. and I am performing the Database.Execute  in the all the batch apex test class to cover the code.. Am I missing or breaking something here.. Please let me know.. thanks 

 

 

Ankit

Hi All,

 

I need to send a VF page as attachment ..  VF page is rendering as PDF... I can not use getcontent and GetcontentasPDF, as I need to schedule this mail on every monday .  ..So I create a VF template... but I getting  a Salesfroce Internal error after I save my tempalte .  .  

 

Template code.....

 

<messaging:emailTemplate subject="Test email" recipientType="Contact" >
<messaging:plainTextEmailBody >
Please find the attachment....
</messaging:plainTextEmailBody>
<messaging:attachment filename="Velocity Trade Confirmation" renderAs="PDF">
<apex:include pageName="reportspage"/>
</messaging:attachment>
</messaging:emailTemplate>

 

 

this a simple page where i am showing any 10 accounts...

 

<apex:page renderAs="pdf" controller="fetchtestdata">
<apex:repeat var="acc" value="{!acc_lst}">
<apex:outputLabel value="{!acc.name}"></apex:outputLabel><br/>
</apex:repeat>

</apex:page>

 

Controller....

 

public class fetchtestdata {
public list <account> acc_lst {get{
return([select name from account limit 10]);
}

set;}

}

 

Please provide your sugesstions.. . thanks .. 

Hi All,

 

 

I am new to flow in SFDC . I have requriement where I need to link the existing flow to a record . So, user will be able to link exisitng  flows to records of an Object.

 

Please help me on this . :)

 

Thanks

 

I have got a very urgent requirement . where i need to write the test class . to get the code coverage i have to create the test data like following . 

 

There would be a Group  object . lets say   G1    and a GroupMember  say  GM1. Now   GM1  would relate to G1 ........

               

                               GM1.GroupId =  G1.Id

      

              now     GM1. UserOrGroupId = "this woul be another group G2" 

 

Now G2 would be Group  where TYPE equals to ROLE or ROLE SUBORDINATES and I need to set Related ID to a Particualr business role .   

                                 G2 would contain User of a particular role . .that would related with

                                                        GM2 . GroupId  = G2.ID

                                                        GM2. UserorGroupId = any user id with some particular role 

 

Problem :- I am not able to create a group of  type role .   Not able to set related Id .  however  GM2  will contain a Single user with a particular role 

 

Please help me on this , Or Redirect to me where I can find the solution .  

 

thanks 

Ankit

hi,

 

I have few deleted records in salesforce Object .  I want to perform undelete Operation through datalaoder. 

can I update IsDeleted = false through dataloader ?

 

thanks in advance. 

 

 

Can I create multiple domain in Force.Com Sites

 

Like :-

 

www.abc.com

 

and

 

www.xyz.com

Hello! 

I'm trying to create the Einstein Vision Lightning App per this trailhead (https://trailhead.salesforce.com/projects/build-a-cat-rescue-app-that-recognizes-cat-breeds/steps/cat-recognition-app-ui-einstein-vision). I added the Apex Class and Lightning Component as shown, but when I add the component or try to use it I get this error:
User-added image

Any idea what this is or how to fix?
Thanks!

Hello Team,
I have a functionality to show the accounts based on the search result, here is my code. 
APP:
<aura:application >
    <c:SearchBarCmp />
    <c:AccountListCmp />
</aura:application>

AccountList Component:
<aura:component implements="flexipage:availableForAllPageTypes" access="global" controller="Swamy_2011.AccountsWithContactsSearchController">
    <aura:attribute name="accnts" type="Account[]"/>
    <aura:handler event="Swamy_2011:SearchKeyChange" action="{!c.SearchKeyChange}"/>
    
    <aura:iteration items="{!v.accnts}" var="acc">
        <p>{!acc.Name}</p>
    </aura:iteration>
</aura:component>

AccListCmpJS:
({
    SearchKeyChange : function(component, event, helper) {
        var searchKey = event.getParam("searchKey");
        var action = component.get("c.accByIds");
        action.setParams({
          "searchKey": searchKey
        });
        action.setCallback(this, function(a) {
            component.set("v.accnts", a.getReturnValue());
        });
        $A.enqueueAction(action);
    }
})

Class:
public class AccountsWithContactsSearchController {
    
    @AuraEnabled
    Public static List<Account> accByIds(string accId){
        List<Account> acc = new List<Account>();
            String name =  string.escapesinglequotes(accId) + '%';
            acc = [Select Id, Name, Type from Account where Name Like:name];
        return acc;
    }
}

Same logic working for Contact records, Suggest me where i missed the code for Account, i hope everything perfect otherthan CSS.

Thanks,
Swamy P R N.
  • September 28, 2017
  • Like
  • 0
We are experiencing some issues after Winter 18. I am not sure whether they are particular to our project or know issues.  Any help on below issues woule  greatly appreciated. 

Issue # 1:
We have noticed that some of our custom css classes are getting overridden with app.css and because of that our UI screens are getting distored.  

Issue#2:
One more issue is that whenever we do code changes through developer console , changes are not getting updated immediately at UI. We suppose to refresh the browser multiple times to see the updated change. It's really effecting our developement time.  This is not the case before winter18.

 
Hi,
I used leaflet map to develop app. However after I change the version of lightening component from 39 to 40 then I got following error whenever I click to leaflet map.  Please also check attached screenshot.  How can I fix this error?

"Unrecognized Content-Security-Policy directive 'referrer'."


Thanks,User-added image
Onur
Hai,

I have a Lightning UI page with few Text area and long text area fields included. When a user key in data, the field values are overlapping on the adjacent field values. It looks so weird. Can someone help me with this weird issue.

Thanks
hi all,
i have created a soap delete request in soap ui tool to delete records in salesforce using External id rather than using the SFDC record id however i am getting the below mentioned response 
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Client</faultcode>
         <faultstring>Element {urn:enterprise.soap.sforce.com}sObjects invalid at this location</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

my delete soap request is 
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
   <soapenv:Header>
      
      <urn:SessionHeader>
         <urn:sessionId>XXXXXXXXXXXXXXXXXXXXXXXXXX</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
     <urn:delete>

        <urn:externalIDFieldName>Product_Id__c</urn:externalIDFieldName>

        <!--Zero or more repetitions:-->

         <urn:sObjects urn:type="Product__c">

          <Product_Id__c>456721</Product_Id__c>

         </urn:sObjects>

      </urn:delete>

   </soapenv:Body>
</soapenv:Envelope>

Any help would be appreciated

thanks
hi all,

i am trying to execute upsert call from enterprise wsdl via SOAP UI tool
below is my soap request.

Problem: i am unable to specify the object type.
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:enterprise.soap.sforce.com" 
xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
     
      <urn:SessionHeader>
         <urn:sessionId>XXXXXXXXXXXXXXX</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:upsert>
         <urn:externalIDFieldName>Product_Id__c</urn:externalIDFieldName>
         <!--Zero or more repetitions:-->
         <urn:sObjects urn:type="Product__c">
            <!--Zero or more repetitions:-->
          <Product_Id__c>456721</Product_Id__c>
          <Name>My test</Name>
          <Product_Brand__c>HIGHLAND PARK</Product_Brand__c>
         </urn:sObjects>
      </urn:upsert>
   </soapenv:Body>
</soapenv:Envelope>
When i run this request i get the below response
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>sf:INVALID_TYPE</faultcode>
         <faultstring>INVALID_TYPE: Must send a concrete entity type.</faultstring>
         <detail>
            <sf:InvalidSObjectFault xsi:type="sf:InvalidSObjectFault">
               <sf:exceptionCode>INVALID_TYPE</sf:exceptionCode>
               <sf:exceptionMessage>Must send a concrete entity type.</sf:exceptionMessage>
               <sf:row>-1</sf:row>
               <sf:column>-1</sf:column>
            </sf:InvalidSObjectFault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
i then added the namespace to my request 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 and the upsert was successfull.Is this a correct way to add the namespace explicitly?
If i send such a wsdl to third party it would eventually fail 
I am working with the new JSON Parsing functionality,
I have API URL that contain json string.I have created one VF page that displays JSON string data in pageblock table in record format from API URL.
Now i want to insert that json string into custom object records. How can I insert new records fron json string to my custom object.
Hi,
    I have a hyperlink in visualforce page, if i click on hyperlink, the value should copy to clipboard

my vfp code;
<apex:outputLink  value="https://{!sfurll}/apex/CoreBenefit_PDF?id={!Returnid}" target="_blank" styleClass="newlink" >
Copy Url
</apex:outputLink>

If i click on "Copy Url", the "https://c.ap1.visual.force.com/apex/CoreBenefit_PDF?id=kA690000000H1An" should be saved in clipboard
Hi All,

Needed one urgent help !!

While debugging an issue, I found there is an exception thrown in the debug logs for an Opportunity:

System.DmlException: Update failed. First exception on row 1 with id <<OPPORTUNITY ID>>; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not match filter criteria.

Then I further checked - Related Lookup Filters associated with the Opportunity.

The Filter Criteria was -

XYZ : Account Name ID EQUALS Opportunity: Account Name ID

where XYZ is a REQUIRED LOOK UP field to the Opportunity.

Can anyone explain as what this filter criteria means. This would be really helpful.

Thank you!

S Kumar

Hello All, 

 

Can anyone help me in identifying if there any oracle web service API exposed for integration with salesforce.

If yes where i can get more details? 

If no can we create web services at the end of oracle and expose them for salesforce is that feasible.

 

 

Thanks

 

Rekha

How do you call a Flow from an Apex class and feed it a record id? Please provide specific example

  • March 22, 2013
  • Like
  • 0

Hi All,

 

           My requirement is insert contacts  when a checked records

a custom chechbox how to write a trigger?

 

 

Thanks in advance.

  • March 21, 2013
  • Like
  • 0

Hi,

     I have created visualforce page for Account using standard controller. after that i created new page layout for Account then dragged the visualforce page but i am facing a problem that i not getting the fields in the visualforce page to drag the fields.

what is the problem.???

 

   thanks in advance....

hi,

 

I have few deleted records in salesforce Object .  I want to perform undelete Operation through datalaoder. 

can I update IsDeleted = false through dataloader ?

 

thanks in advance. 

 

 

Hi,

 

I want to send pdf attachment through email, which will execute on E-Mail service. I wrote class for that and it is sending pdf successfully, but i am getting error while opening the pdf as,

 

"adobe reader could not open attachment.pdf becauseit is eithernot a supportedfile type or because file has been damaged (for example, it was sent as an email attachment & was't correctly decoded."

 

Please help me out. Thank you so much..

 

global class DeliverTrackerbyEmail implements Messaging.InboundEmailHandler {

global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email, 
                                                  Messaging.InboundEnvelope env){

Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();

String myPlainText = '';

// Add the email plain text into the local variable

try
{
      myPlainText = email.plainTextBody;
      
}
catch (System.StringException e)
{
}
 
       String fromMail=email.fromAddress;
       String submodule=myPlainText.substring(0,8);
       Resource__c res=[Select Name,Employee__r.Name__c
       From Resource__c  
       Where Employee__r.Email_ID__c = :fromMail];
       
       String ResourceNumber=res.Name;
       Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); 
     
        Resource__c ab=[select id from Resource__c where Name=:ResourceNumber limit 1];
        // Reference the attachment page and pass in the account ID
        PageReference pdf =  Page.attachmentPDF;
        pdf.getParameters().put('id',ResourceNumber); 
        pdf.setRedirect(true);

        // Take the PDF content
        Blob b = pdf.getContent();

        // Create the email attachment
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
        efa.setFileName('attachment.pdf');
        efa.setBody(b);

        String addresses;
   
        String[] toAddresses = new String[]{fromMail};
        mail.setSubject( 'Tracker ' );
        mail.setToAddresses(toAddresses);
        mail.setPlainTextBody(' Hi,'+res.Employee__r.Name__c+' Please find the Attched Tracker with this mail. ');
        mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});// Sends the email 
       
   
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});   

  result.success = true;

  // Return the result for the Force.com Email Service
  return result;
}
static testMethod void testTasks() {

// Create a new email and envelope object
   Messaging.InboundEmail email = new Messaging.InboundEmail();
   Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();

// Create the plainTextBody and fromAddres for the test
    email.plainTextBody = 'Here is my plainText body of the email';
    email.fromAddress ='rmencke@salesforce.com';

EmailServiceClass taskObj = new EmailServiceClass();
taskobj.handleInboundEmail(email, env);
} 


}

Thank you,

Amol Dixit

 

As I am new to salesforce , can you please help me out in writing batch apex?
Our requirement is to send a mass email to all EventUsers(child of contact) at specified interval of time.
Please reply ASAP as it is an urgent requirement.

Hi,

 

I'm trying to rotate text within Visualforce page that is being rendered as PDF. I've managed to rotate the text in the HTML  version of the page by applying the two browser specific CSS styles that are supported by Firefox and IE below:

 

 

-webkit-transform: rotate(90deg); -moz-transform: rotate(90deg);	

 

filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);

 

But, when I add the renderAs="PDF" attribute to the page and, the text is not rotated. Has anyone ever tried this? Does anyone know of a way to get it to work?

 

  • May 13, 2010
  • Like
  • 0

I have a few once active approval process that, when deactivated, I cannot delete.  Is there a way to delete these old approval processes or are they going to be stuck in my salesforce org forever?  I've tried removing the records that have approval history but with no success.

 

Any help would be appreciated on this.

Hi,
 

I downloaded the salesforce client certificate from salesforce website, but when I use keytool to import this certificate to keystore. the error message comes as below.

keytool -import -alias sforce -file sfdc_client.cert -keystore trust.keystore
Enter keystore password:  tangquan
keytool error: java.lang.Exception: Input not an X.509 certificate

but it is successful with the verisign public certificate. the salesforce certificate ends with cert file extension, but verisign's ends with cer file extension. It will be helpful if you guys provide information on this.

Hi friends! 

I had an issue earlier this week where I got a notice via email of a Lightning Readiness Report being initiated that I did not initiate. 

My boss is concerned that it might be a security issue, so before we launch into a comprehensive event log audit I'm trying to figure out if it could have been executed by one of our users.

Anyone out there have any advice about how I might be able to find out when each Lightning Readiness Report was initated and by whom (which user)?   

Thanks!
Jen