• Kashmira Puranik
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I have Opportunity Owner on Opportunity and I have created a custom object call Commission A, B and C. I want to auto fill the Commission A with existing opportunity owner. FYI- Commission A is blank. So every time a new opportunity is created commission A is updated with exiting opportunity owner. I have tried various thing thing like workflow rule, process builder but isn't working or I think I am doing something wrong. Do any one have any idea about this or any help regarding thsi problem?
Hello,

I have a Lightning component on my opportunity page that does the following:
  • When clicking on the button, it opens a Lightning modal box
  • This modal box display a Visualforce page, renderas PDF, inside an iframe.
  • I have two button bellow: Cancel, Save
The purpose is to generate and save a PDF to the current record. the modal box allows to preview the document before saving attach it.

-> My issue is: how to save the PDF generated by the Visualforce page, and attach it to the Opportunity?
Any ideas?

demoModal.cmp:
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global">
  <!--use boolean attribute for Store true/false value,
    make default to "false" so modal box are not display on the load of component. 
    --> 
    
    <aura:attribute name="recordId" type="Id" />

  <aura:attribute name="isOpen" type="boolean" default="false"/>
 
  <!--Use "slds-m-around- -xx-large" class to add standard Large padding to the component--> 
  <div class="slds-m-around--xx-large">
    <button class="slds-button slds-button--brand" onclick="{!c.openModel}">Create a document</button>  
    
  <!--Use aura:if tag to display Model Box, on the bese of conditions. [isOpen boolean attribute] -->   
    <aura:if isTrue="{!v.isOpen}">
      
   <!--###### MODAL BOX Start From Here ######--> 
      <div role="dialog" tabindex="-1" aria-labelledby="header99" class="slds-modal slds-fade-in-open ">
        <div class="slds-modal__container">
          <!-- ###### MODAL BOX HEADER Part Start From Here ######-->
          <div class="slds-modal__header">
            <button class="slds-button slds-modal__close slds-button--icon-inverse" title="Close" onclick="{!c.closeModel}">
            X
            <span class="slds-assistive-text">Close</span>
            </button>
            <h2 id="header99" class="slds-text-heading--medium">Your document</h2>
          </div>
          <!--###### MODAL BOX BODY Part Start From Here ######-->
            <iframe src="{! '/apex/monpdf?Id='+v.recordId}" width="100%" height="500px;" frameBorder="0"/>
          <div class="slds-modal__content slds-p-around--medium">
            <p><b>Some random text.
              </b>
            </p>
          </div>
          <!--###### MODAL BOX FOOTER Part Start From Here ######-->
          <div class="slds-modal__footer">
            <button class="slds-button slds-button--neutral" onclick="{!c.closeModel}" >Cancel</button>
            <button class="slds-button slds-button--brand" onclick="{!c.savenClose}">Save the document</button>
          </div>
        </div>
      </div>
      <div class="slds-backdrop slds-backdrop--open"></div>
      <!--###### MODAL BOX Part END Here ######-->
    
 </aura:if>
  </div>
</aura:component>

monpdf.vfp:
<apex:page standardController="Opportunity" showHeader="false" renderAs="pdf">
{!Opportunity.Account.Name}
</apex:page>

demoModalController.js
({
   openModel: function(component, event, helper) {
      // for Display Model,set the "isOpen" attribute to "true"
      component.set("v.isOpen", true);
   },
 
   closeModel: function(component, event, helper) {
      // for Hide/Close Model,set the "isOpen" attribute to "Fasle"  
      component.set("v.isOpen", false);
   },
 
   savenClose: function(component, event, helper) {
      // Display alert message on the click on the button from Model Footer 

      
       alert('It works');
      component.set("v.isOpen", false);
   },
})

 

Was wondering if someone has successfully accomplished cloning a quote and the related quote line items?  I need it to create a new quote revision without creating a whole new quote with new quote number...just a new revision number.

 

I am struggling and thought that this task has probaly been done by someone "out there"...

 

I appreciate your help!!

  • September 14, 2011
  • Like
  • 0