• Shaker Kuncham 1
  • NEWBIE
  • 20 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 4
    Replies
Hi 

How to change the string date format to Date format which is coming through External object.

It should be : YYYY-mm-dd

however its getting yyyymmdd

Code : public class PaymentScheduleController {
    @AuraEnabled
    public static List<PAYMENT_SCHEDULE__x> loadData(String recId){
        List<PAYMENT_SCHEDULE_x> paymentScheduleList = new List<PAYMENT_SCHEDULE_x>();
        if(!String.isEmpty(recId)){
            Giving_History_c sourceObj = [Select Id,Name,Gift_Record_Typec,Gift_Sub_Typec,Pledge_Statusc from Giving_History_c where id=: recId];
            
            if((!String.isEmpty(sourceObj.Gift_Record_Type_c) && (sourceObj.Gift_Record_Type_c == 'Pledge'))
               && (!String.isEmpty(sourceObj.Gift_Sub_Type_c) && !(sourceObj.Gift_Sub_Typec == 'Open Sustaining Pledge' || sourceObj.Gift_Sub_Type_c == 'Open Payroll Pledge'))){
                   
                   paymentScheduleList = [Select Id,PAYMENT_SCHEDULE_AMOUNT__c,
                                          PAYMENT_SCHEDULE_BALANCE__c,
                                          PAYMENT_SCHEDULE_DATE__c,
                                          PAYMENT_SCHEDULE_PLEDGE_NBR__c,
                                          PAYMENT_SCHEDULE_STATUS__c 
                                          from PAYMENT_SCHEDULE__x where 
                                          PAYMENT_SCHEDULE_PLEDGE_NBR_c =: sourceObj.Name order by PAYMENT_SCHEDULE_DATE_c asc];   
               
               }
        }
        return paymentScheduleList;
    }    
}




<aura:iteration items="{!v.PaymentScheduleList}" var="item">
 <tr class="slds-hint-parent">
  <th data-label="Date" scope="row">
     <div class="slds-truncate" >
     <lightning:formattedDateTime value="{!item.PAYMENT_SCHEDULE_DATE__c}" year="numeric" month="numeric" day="numeric"/></div>
  </th>
  <td data-label="Amount">
   <div class="slds-truncate" >{!item.PAYMENT_SCHEDULE_AMOUNT__c}</div>
  </td>
  <td data-label="Balance">
   <div class="slds-truncate" >{!item.PAYMENT_SCHEDULE_BALANCE__c}</div>
  </td>                        
 </tr>                    
</aura:iteration>
if have check box called isEpicstory and filed called epic story
if user isspeic story (check box ) is true then epic story field should be empty ( user should not entery value need to restrict )


Regards
Shaker
Hi

When Customer create the case getting new case notification ( this is set up using suppot setting ) and its case goes to Inbound queue and it will notify the all the queue memebers. (For the new case it is good and working fine )

When Queue member pick the ticket from Inbound Queue and take the ownership and again new case email notiication is getting who took the ownership of the ticket..... ( this should not happen )

When ever case owner change the status of the ticket ( again case owner is getting new case email ) This should not happen ), there is no workflow used for this process, we are using support settings.

Please suggest...
 
Hi All


Is it possible to prevent the multiple users accessing the same case / editing the same case at a time. When multiple users working on the same case it should throw error, " syaing : other user is working on the case "

Regards
Shaker
Hi

I have two fields (1) Error__ message__C ( Pick list )     (2) other__  Error__ Message__C ( Text  Field )
for Eg: (1) if i select value from the Error__ message__C , user should not enter Text for other__ Error__ Message__c
any of the value say ( a,b,c, Other)
(2) If i select Value called Other from the Error__ message__C ,  user should enter text for other__ Error__ Message__c


Regards
Shaker
 
Hi All

I have creaed a approval process and uploading a PDF document and technical writer will submit for approval process, then approver will receive the email with PDF, however approver receiving the PDF but without content ( blank PDF ). Below is the code, 
<messaging:emailTemplate subject="Document Submitted" recipientType="User" relatedToType="Compliance_Documents__c">
<apex:image url="/servlet/servlet.FileDownload?file=015W0000000Dmru"
height="64" width="64"/>
    <messaging:htmlEmailBody >
        <html>
        <img src="http://www.XXXX.com/ucmprdpub/groups/public/documents/logo/logo_png.png"/>
            <body>
            <p>Dear {!recipient.name},</p>
            
            <p>Attached is document related to Compliance Document "{!relatedTo.Compliance_Document_Name__c} ". </p>
            <p>Please Review the document and <B> Approve/Reject.</B> To approve or reject this item, click this link </p>
            <P>
                <apex:outputLink value="https://cs13.salesforce.com/{!relatedTo.id}">
                    Approve / Reject
                </apex:outputLink>
                <Br/><Br/>or <Br/><Br/>
                <B> To Approve through email :</B> reply to this email with one of these words in the first line of the email message: APPROVE, APPROVED.
                <Br/><Br/>
                <B> To Reject :</B> Please click on the above link.
                <Br/><Br/>
                <B>For Comments: </B>
If replying via email, you can also add comments on the second line. Comments will be stored with the approval request in Salesforce CRM.
            </P>
            <br/> <br/>
           <b> Previous approval history </b>

        <c:ApprovalItem recordId="{!relatedTo.Id}" />
         <br/>
          <br/>
        
            Kind Regards, <br/>
            Document Compliance Team
            
            </body>
        </html>
    </messaging:htmlEmailBody>
    
    <messaging:attachment filename="{!relatedTo.name}" renderAs="PDF">
        <apex:repeat var="cx" value="{!relatedTo.id}">
        </apex:repeat> 
    </messaging:attachment>
</messaging:emailTemplate>



Regards
Shaker
Original question:
Hi All

I have creaed approval process on custom object where i need to submit a PDF document for approval process. Once I attached the PDF file and submitted for Approval, am geeting email  with PDF, however without content, getting blank PDF.
Below is my code for VF email template. Please suggest....

<messaging:emailTemplate subject="Document Submitted" recipientType="User" relatedToType="Compliance_Documents__c">
<apex:image url="/servlet/servlet.FileDownload?file=015W0000000Dmru"
height="64" width="64"/>
    <messaging:htmlEmailBody >
        <html>
        <img src="http://www.XXXX.com/ucmprdpub/groups/public/documents/logo/logo_png.png"/>
            <body>
            <p>Dear {!recipient.name},</p>
            
            <p>Attached is document related to Compliance Document "{!relatedTo.Compliance_Document_Name__c} ". </p>
            <p>Please Review the document and <B> Approve/Reject.</B> To approve or reject this item, click this link </p>
            <P>
                <apex:outputLink value="https://cs13.salesforce.com/{!relatedTo.id}">
                    Approve / Reject
                </apex:outputLink>
                <Br/><Br/>or <Br/><Br/>
                <B> To Approve through email :</B> reply to this email with one of these words in the first line of the email message: APPROVE, APPROVED.
                <Br/><Br/>
                <B> To Reject :</B> Please click on the above link.
                <Br/><Br/>
                <B>For Comments: </B>
If replying via email, you can also add comments on the second line. Comments will be stored with the approval request in Salesforce CRM.
            </P>
            <br/> <br/>
           <b> Previous approval history </b>

        <c:ApprovalItem recordId="{!relatedTo.Id}" />
         <br/>
          <br/>
        
            Kind Regards, <br/>
            Document Compliance Team
            
            </body>
        </html>
    </messaging:htmlEmailBody>
    
    <messaging:attachment filename="{!relatedTo.name}" renderAs="PDF">
        <apex:repeat var="cx" value="{!relatedTo.id}">
        </apex:repeat> 
    </messaging:attachment>
</messaging:emailTemplate>
 
Hi

Created a approval process on custom object and submitting the PDF document for approval process.
1. Approver is getting the email with the PDF document however with empty content.
Please find the below code :

<messaging:emailTemplate subject="test email temp subject" recipientType="User" relatedToType="Compliance_Documents__c">
<apex:image url="/servlet/servlet.FileDownload?file=015W0000000Dmru"
height="64" width="64"/>
    <messaging:htmlEmailBody >
        <html>
        <img src="http://www..com/ucmprdpub/groups/public/documents/logo/logo_png.png"/>
            <body>
            <p>Dear {!recipient.name},</p>
            
            <p>Attached is document related to Compliance Document "{!relatedTo.Compliance_Document_Name__c} ". </p>
            <p>Please Review the document and <B> Approve/Reject.</B> To approve or reject this item, click this link </p>
            <P>
                <apex:outputLink value="https://cs13.salesforce.com/{!relatedTo.id}">
                    Approve / Reject
                </apex:outputLink>
                <Br/><Br/>or <Br/><Br/>
                <B> To Approve through email :</B> reply to this email with one of these words in the first line of the email message: APPROVE, APPROVED.
                <Br/><Br/>
                <B> To Reject :</B> Please click on the above link.
                <Br/><Br/>
                <B>For Comments: </B>
If replying via email, you can also add comments on the second line. Comments will be stored with the approval request in Salesforce CRM.
            </P>
            <br/> <br/>
           <b> Previous approval history </b>

        <c:ApprovalItem recordId="{!relatedTo.Id}" />
         <br/>
          <br/>
        
            Kind Regards, <br/>
            Document Compliance Team
            
            </body>
        </html>
        
    </messaging:htmlEmailBody>
    <c:IncludeAttachments parentId="{!relatedTo.Id}"/>
    <!--<messaging:attachment renderAs="PDF" filename="{!relatedTo.Name}"></messaging:attachment>-->
</messaging:emailTemplate>




 
Hi 

for Eg: if my case comments reach 5 comments it should notify manager ( on every 5th count ) for the same business day on the same DATE.

1. Can i accomplish with workflow
2, Does it require trigger

Please help me with code.


Regards
Shaker








 
I use the "Follow" feature on Cases to keep track of activity on them via
the SalesForce Chatter desktop application. Every couple of months I get a
notification when trying to follow a case that I've reached my maximum
amount of "Follows," which I believe is 500. This is because I'm continuing
to follow cases that have been Closed.

Is it possible to configure so that once a case is Closed it automatically
removes any followers?


Regards
Shaker

I have creaed two feilds 1. Daily comment count 2. Total Comment Count and every day schedule the job at 12:00am so that daily comment will become 0 and added to Total comment count. However when schedule job is running on case the last updaed date is getting modifed as per the job run, below is the schedule job code.

global class CaseCommentCount_JobScheduler implements Schedulable {

    global void execute (SchedulableContext sc)
    {
       
        List <Case> daily_UpdatedCaseList = new List<Case>();
               
        List <Case> daily_CaseList = [select id,Daily_Comment_Count__c from case where Daily_Comment_Count__c > 0 AND Status !='Closed'];
        
        System.debug('CaseCommentCount_JobScheduler : daily_CaseList size' + daily_CaseList.size());
        for(case c : daily_CaseList ){
            c.Daily_Comment_Count__c = 0;
            daily_UpdatedCaseList.add(c);
       }
        update daily_UpdatedCaseList;
        System.debug('CaseCommentCount_JobScheduler : daily_UpdatedCaseList size' + daily_UpdatedCaseList.size());
        
    }
}

1. is there any other way without changing and modifed last updaed 
2. I am planning to update the job every day at 9:00pm 
3. Please help in the code to schedule the job everyday.

Regards
Shaker 
 
Hi

I have two fields (1) Error__ message__C ( Pick list )     (2) other__  Error__ Message__C ( Text  Field )
for Eg: (1) if i select value from the Error__ message__C , user should not enter Text for other__ Error__ Message__c
any of the value say ( a,b,c, Other)
(2) If i select Value called Other from the Error__ message__C ,  user should enter text for other__ Error__ Message__c


Regards
Shaker
 
I use the "Follow" feature on Cases to keep track of activity on them via
the SalesForce Chatter desktop application. Every couple of months I get a
notification when trying to follow a case that I've reached my maximum
amount of "Follows," which I believe is 500. This is because I'm continuing
to follow cases that have been Closed.

Is it possible to configure so that once a case is Closed it automatically
removes any followers?


Regards
Shaker