• Pandeiswari Sathiakumar
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi,

I have a visualforce page. When clicking on button, it should open the Contact Lightning Record Page with additional parameters in the URL. I have one LWC component embedded inside the Contact Record Page. That LWC component should use this additional parameter from the URL to display data.

Please let me know how to accomplish this.

 
Is it possible to create 1 report with One Parent Object and two related child Object in salesforce.

For example. A is parent and have two related list B and C. 
Need one report with A and B C details . B and C data will be grouped to get total.
I've an Aura Component that is overridding the "New" Button. The aura component loads the LWC - which displays a record edit form to input data. 
This works well the first time. However, if I fill in some value on a field, click New again - the data/form that is displayed is cached and shows the old data. How do I overcome this?
Hello,

I am using Dropzone for upload file drag and drop. But when I submit form then it gives error required BODY is missing. Without dropzone its working correct.

I am using below code:
 
<apex:form id="dropzoneForm" styleClass="dropzone1">
                                                                                <div class="fallback">
                                                                                    <apex:inputFile id="profilePhoto" value="{!profilePhoto}" />
                                                                                </div>
                                                                                <br />
                                                                                <br />
                                                                                <apex:commandButton action="{!saveProfilePhoto}" title="Save Changes" value="Save Changes" styleClass="btn btn-primary btn-sm btn-block btnsave" id="btnsave"/>
                                                                            </apex:form>



 
<script>
Dropzone.options.dropzoneForm = {
            paramName: "file", // The name that will be used to transfer the file
            maxFilesize: 2, // MB
            dictDefaultMessage: "<strong>Drop files here or click to upload. </strong>"
                };
</script>

Apex Code:
 
public PageReference saveProfilePhoto()
    {
        try{
        //system.debug('testpic');
            Attachment profilePhotoObj = new Attachment();
            profilePhotoObj.body = profilePhoto;
            profilePhotoObj.name='profilephoto';
            profilePhotoObj.ParentId = artist.id;
            insert profilePhotoObj;
            
            
            String attachedPhotoId = profilePhotoObj.id;
            String profilePhotoObjId = attachedPhotoId.subString(0,15);
            
            artist.Artist_Photo__c  = '/servlet/servlet.FileDownload?file='+profilePhotoObjId ;
            
            upsert artist;
            
            artistId = ApexPages.currentPage().getParameters().get('artistId');
            //system.debug('artist id ='+artistId );
            PageReference pg = new PageReference('/apex/Profile?artistid='+artistId );
            pg.setRedirect(true);
            return pg;
        }
        catch(Exception ex)
        {
            ApexPages.addMessages(ex);
            system.debug('testpic'+ex);
        }
        
        return null;
    }



Can anyone please provide code for this using dropzone.

Thanks
Sohan Raj Gupta