• Sagar Bhatia
  • NEWBIE
  • 15 Points
  • Member since 2017

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

I have a requirement to tag the location of image captured from salesforce mobile app , its a standard mobile app , Using Lighting:input with type=file . We need to capture the location where the photo was captured . Also I want to be able to block user from browsing image from galery it should be only able to capture image via camera . 
Do let if you have any suggestions 

Thanks
Hi guys ,

We have a CustomApp which was previously in Classic and currently we are working to migrate salesforce to lightning , so I am not sure how to deploy the new Lightning App which was created by Upgrading the Classic version of CustomApp . Not sure how we can deploy instead of doing a manual step of Upgrading. 

Thanks
Hi,

I have a lightning component called InvoiceGenerator. Which is programmed to generate invoice PDF / send an Email with PDF . My requirement is to call the same component from two different Quick Actions, So I want to differentiate between the actions as which one is PDF and Send Email. I cannot create a new component and pass a parameter for IsPDF. Need to do in a single component itself. 

Basically, I need to know which quick action was pressed so that I can make sure my code is processed as per request. 
Using ANT to retrive and deploy package.xml . Not sure which xml tag is used to retrive Lightning Component Tab . 
Hi ,

I have a lightning component which is called from a quick Action on a Custom Object called Invoice . Invoice is the child of Account ,
relationship is defined as Account__c(Master-Detail) .

Now on click of quick Action , I need to set a attribute with the Account__c.Id , I tried doing with recordData but can't actually get it . Here's my code , any help appreciated

LightningComponent

 <aura:component implements="flexipage:availableForAllPageTypes,force:appHostable,force:lightningQuickAction,force:hasRecordId">
<aura:attribute name="recordId" type="String" />
    <aura:attribute name="recordInfo" type="Object" />
    <aura:attribute name="invoicerec" type="object"/>
    <force:recordData aura:id="invoiceRecord"
                    recordId="{!v.recordId}"
                    targetFields="{!v.invoicerec}"
                    targetRecord="{!v.recordInfo}"
                    layoutType="FULL"/>
    <aura:attribute name="accountId" type="String"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />



doInit : function(component, event, helper) {

        //var invoicerec1 = component.get("v.invoicerec");
        //console.log("v.recordId12334"+component.get("v.invoicerec1.Account__c"));
        var accrecId= component.get("v.invoicerec.Account__c"); 
      component.set("v.accountId",accrecId);
       console.log("v.invoicerec.Account__c"+accrecId);
          console.log('v.accountId'+component.get("v.invoicerec"));

}

None of the statments worked . Let me know your thoughts
Hi folks ,

I need to send email invoice to particular contacts of a account when I click a quick action button on Account page , it can be one contact or multiple, users will have the ability to select contact . Also having ability to add any extra e-mails id and since its a invoice email an attachment is also to be added which will be queried from attachment object basically  . I was thinking of using flows for this functionality but haven't been able to make sure if this is possible using flows . Can you please help with this ......

Thanks
Hi ,

We have a requirement to migrate documents/Attachements from legacy system to salesforce , Can anyone suggest the possible ways to achive this.. Is there any connected app or some code we can run for doing so ?? 
 
Hi ALL,

We are trying to access Approval/Rejection comments of the Approval process so that we can make sure the Approver / Rejector add there comments for every step. To do so we found we can access comments using nested query to ProcessInstance along with StepsAndWorkItems , although we are still trying to figure out how exactly StepsAndWorkItems relate with respect to each step in the Approval process. 

When trying to query : SELECT Id, (SELECT Id,ProcessNodeId,ProcessInstanceId,Comments,TargetObjectId FROM StepsAndWorkitems )
FROM ProcessInstance

We could see multiple processNode for one Step, Really confused looking at the data .
User-added image
 <div role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_small" aura:id="Modalbox" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1">
        <div class="slds-modal__container" style="width:350px;">
            <header class="slds-modal__header">
                <lightning:buttonIcon iconName="utility:close"
                                      onclick="{! c.closeModel }"
                                      alternativeText="close"
                                      variant="bare-inverse"
                                      class="slds-modal__close"/>
                <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">Choose Pricebook</h2>
            </header>
            <div class="slds-modal__content slds-var-p-around_large" style="overflow: initial;" id="modal-content-id-1">
                <p>
                  
                    all products from the opportunity price book group.</p> <br></br>
                <lightning:combobox name="Price Book" label="Price Book" value="{!v.selectedPricebookId}" placeholder="Select Price book" options="{!v.priceBookList}" />
                <div>
                    <aura:if isTrue="{!v.isPricebookChange}"> 
                        <c:confirm_Pricebook_Change opportunityId="{!v.opportunityId}"   selectedPricebookId="{!v.selectedPricebookId}"/>
                    </aura:if>
                </div>
            </div>
            <footer class="slds-modal__footer">
                <lightning:button variant="neutral"
                                  label="Cancel"
                                  title="Cancel"
                                  onclick="{!c.closeModel}"/>
                <lightning:button variant="brand"
                                  label="Save"
                                  title="Save"
                                  onclick="{!c.handleSave}"/>
            </footer>
        </div>
        
    </div>
    <div class="slds-backdrop slds-backdrop_open" aura:id="Modalbackdrop"></div>


wheere confirm_Pricebook_Change  is another modalUser-added image
Hi ALL,

We are trying to access Approval/Rejection comments of the Approval process so that we can make sure the Approver / Rejector add there comments for every step. To do so we found we can access comments using nested query to ProcessInstance along with StepsAndWorkItems , although we are still trying to figure out how exactly StepsAndWorkItems relate with respect to each step in the Approval process. 

When trying to query : SELECT Id, (SELECT Id,ProcessNodeId,ProcessInstanceId,Comments,TargetObjectId FROM StepsAndWorkitems )
FROM ProcessInstance

We could see multiple processNode for one Step, Really confused looking at the data .
User-added image
I am working on sending an email with the opportunity files based on certain criteria. I am able to send an email with the 'versionData' as an email body which is queried from 'Contentversion'. 
Problem: When i try to open the attachment from email it says 'Preview not available' and also i am not able to open the downloaded attachment too.
Please find the code below and let me know where I am going wrong. Thanks!
List<id> ContentDocumentids = new List<id>();

for(contentDocumentLink CDLink : [SELECT LinkedEntityid, ContentDocumentid FROM contentDocumentLink WHERE LinkedEntityid=:'Object id'])
                {
                   ContentDocumentids.add(CDLink.ContentDocumentid);  
                }
                for ( ContentVersion cversion : [SELECT title, 
                                                        PathOnClient, 
                                                        versiondata 
                                                  FROM contentversion 
                                                  WHERE ContentDocumentId IN :ContentDocumentids  
                                                   AND title LIKE 'WOCF%'])
                 {
                  blob WOCFbody = cversion.versiondata;
                  system.debug('body : '+WOCFbody+'-----------'+cversion.title);
                  Messaging.Emailfileattachment efa1 = new Messaging.Emailfileattachment();
                  efa.setFileName(war2.opportunity__r.name+'-'+cversion.title);
                  efa.setBody(WOCFbody);
                  fileAttachments.add(efa); 
                 }

 
  • March 14, 2018
  • Like
  • 0
Hello,
Is there any way to query the "Approval History" related list on custom object ?
The fields I need to query are :"Actual Approver","Overall Status" and "Date".

Thanks
Hi I have written a trigger to update a field "Approved By" on a custom object. However, due to record locked by Approval process, the trigger had to be before trigger. Is there a way I can fetch the ID of the user who actually approved the process? 

processinstance[0].WorkItems[0].ActorId will return the first or the last userid depending on the index. I cannot figure out how to fetch who is actual approver. 

Also ActorID only returns an ID of a queue if the process assigns it to a queue. Not the userID. How can I get the the user ID.. PLEASEE PLEASEEE HELP!! 

I need to release this code within 2-3 days so I'm in dier need of help right now!