• Bhavdip P Gadhiya
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 5
    Replies
Hi,
when big blob logfile is converted into string in batchclass, its throwing error that "System.LimitException: Apex heap size too large: 6039080" Please let me know different approaches.
I cannot divide the blob file, its directly fetch from EventlogFile--> LogFie.
Thanks in advance.
when i try to attach more than one file in notes & attachment or file then error message should be displayed in lightning?  

trigger attchmentTriggerLimit on Attachment (after insert) {
    List<attachment> accountList = new List<attachment>();
     for(attachment att1:trigger.new){
  
     accountList = [select id from attachment where parentid =:att1.ParentId];
     if(accountList.size()>0){
         att1.adderror('Only one file should be attach.');
     }
     }
 }

Its working in classic but not in lightning..................
I have 2 custom objects i.e objOppor and ObjProduct

ObjProduct is a lookup to objOpportunity.

I need to implement as shown below using datamodel in salesforce.

product          Mandatory fields in objOpportunity
ProductA       date
                      Price

ProductB      Name
                     Qty

ProductC     complain
                    status
               
For every poduct there are certian fields mandatory in the parent object objOppor.

so when I create new record of objOpportunity object and select ProductA from Lookup then I need to enter data into the fields Name and Qty only

similarly if I create record of objOpportunity and select productB from lookup, so in objOpportunity , only the fields Name and Qty should appear and they should ne mandatory.

May I know how to achieve this inside the salesforce datamodel only?

sheila
Hi,
when big blob logfile is converted into string in batchclass, its throwing error that "System.LimitException: Apex heap size too large: 6039080" Please let me know different approaches.
I cannot divide the blob file, its directly fetch from EventlogFile--> LogFie.
Thanks in advance.
Hello, I'm being new to Salesforce REST API. I am currently getting started on this page: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest_resources.htm

According to the instruction, in order to access the Version resource, we need to access the url  https://yourInstance.salesforce.com/services/data/

My question is what I should use to replace yourInstance here? The instruction in yellow box on https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest_resources.htm saying that I should "Replace that text with the instance for your org." However, how do I know what is the instance for my org? 
Hi Everyone , I am stuck
I am currently testing out some functionality where I have to pass 1 record value from one instance to other instance of salesforce using SOAP webservice and WSDL , steps being followed by me :
step1 :  wrote a webservice class in SFDC instance1
step2 : after successfull creation , clicked on GENERATE WSDL on the same page and saved it.
step 3 : opened my SFDC instance2 and in Apex class -- clicked on Generate from  WSDL , here i refered to the wsdl class which I had obtained from SFDC instance 1.
step 4 :  now I am working in my another controller class in sfdc Instance2 and trying to fetch the data retured from WSDL class (by intiating it and calling my method in it ) but it is saying
"System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor="

I know I am missing many things :
- call login() with username and password
- I have to fetch the session ID and use it

even I want to set them up , but I am unable to find out them in my "APEX generated from wsdl class" . There is only 1 method with the name LoginINFO (no username or password in the method) in my apex generated frm WSDL
please advise and assist me.
Thanks
Hi-
In the Lightning experience I am struggling with the functionality of Notes & Attachment object. When I click the dropdown on the Notes & Attachments icon I can "Upload File". But what I really want to do it "Attach a File", which is the functionality from the Classic experience.

This matters because I need to havd "Attachments" not "Files" to load into Docusign. I want to have this functionality in the Lightning interface without going to Classic.

Any ideas?

Thanks all!