• Himanshu Patel 55
  • NEWBIE
  • 5 Points
  • Member since 2017

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

I want to send notification to few contacts on 1st of every month without writing Schedulable Job. I have checked Scheduled Flow but it doesn't have option for sending every month. Is there any other solution available through point and click. 
Hi, 

I have converted Java Script button through SF configurator and deployed it but not working in lightning. Below is the code. Not sure what's missing. 
Component
<aura:component extends="c:LCC_GenericLightningComponent" >
    <aura:set attribute="partially" value="false"></aura:set>
    <aura:set attribute="isAdditionalObject" value="false"></aura:set>

    <!-- User Interface -->
    <div>
        <div class="slds-scrollable slds-p-around_medium slds-text-heading_small" id="modal-content-id-1">
            <p class="slds-hyphenate"><a style="outline: 0;" href="https://github.com/developerforce/LEXComponentsBundle" target="_blank">Sample Lightning Component Action</a></p>
            <br/>
        </div>
        <footer class="slds-modal__footer">
            <lightning:button class="slds-button_brand" onclick="{!c.accept}" label="Accept"/>
        </footer>
    </div>

    <!-- The height of the modal is defined in Salesforce, when you create the new action. -->
    <!-- Recommended height size: 250px -->
	
</aura:component>
---------------------------------------------------------------------------------------------------------------
Controller 
({
    accept : function(component, event, helper) {
        $A.get("e.force:closeQuickAction").fire();
    }
})
({
	helperMethod : function() {
		
	}
})
-----------------------------------------------------------------------------------------------------------------
Java Script Button from Classic
//This code allows for the JS SOQL calls {!Account.Include_in_Retailer_Search__c}
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")} 

//Select the current Contact records and put it into the record variable 
var records = sforce.connection.query("SELECT Id, Agreement_Sent__c FROM Account Where id= '{!Account.Id}'"); 
var contactRec = records.getArray('records')[0]; 

//JS sees the number field as a string so this will make sure that 
//is a number - Number(contactRec.Emails_sent_count__c) 
contactRec.Agreement_Sent__c= Number(contactRec.Agreement_Sent__c) + 1; 

//Update contactRec object 
sforce.connection.update([contactRec]); 

//Reload the page 
window.location.reload();

 
Hi, 

I am trying to call Apex Class from Trigger and getting error 'Method does not exist or incorrect signature'. How should i call constructor in Trigger. 

trigger Accountrigger on Account (before update) {
             if(Trigger.Isupdate && Trigger.IsBefore)
    {  
            for (Account Acc:Trigger.new)
            {
              SenddataRequest();
              }
    }      
}

Below is Apex Class
public class SenddataRequest {

    public class requestWrapper

{-----Code-----    }
        
    public String GetAccounts(Account a)

    { -----Code----      }
    

public SenddataRequest(){
      ----- Code-------------        
}
        
    }

}



 

Hi Guys, 

I am having a problem with Auto Approval process when case is created from Customer Community. This process was designed few years ago and working fine until last week. Suddently Auto approval functionality not working. 

Below is from debug log 

11:06:36.0 (789572586)|WF_RULE_FILTER|[Case : Case Record Type equals Vet Refusal, Complaint] AND
 ([Case : Case Origin equals Veterinary Portal] OR
 ([Case : Case Origin equals Web form] AND
 [Account : Account Record Type equals Veterinarian, Veterinarian School]))
11:06:36.0 (789599544)|WF_RULE_EVAL_VALUE|01250000000Qn2F
11:06:36.0 (790013307)|WF_RULE_EVAL_VALUE|Web form
11:06:36.0 (790025657)|WF_RULE_EVAL_VALUE|Web form
11:06:36.0 (790038537)|WF_RULE_EVAL_VALUE|0121T000000ARoR
11:06:36.0 (790050307)|WF_EVAL_ENTRY_CRITERIA|Palatability Refusals Process|00X50000001a8hG|false
11:06:36.0 (790087611)|WF_PROCESS_FOUND||No applicable approval process was found.
11:06:36.0 (790841041)|CODE_UNIT_FINISHED|Workflow:ApprovalProcessActions
11:06:36.0 (790980116)|DML_END|[251]
11:06:36.0 (791029629)|EXCEPTION_THROWN|[251]|System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: []
11:06:36.0 (791458699)|HEAP_ALLOCATE|[251]|Bytes:127
11:06:36.0 (791511759)|VARIABLE_SCOPE_BEGIN|[257]|e|System.DmlException|true|false
11:06:36.0 (791603768)|VARIABLE_ASSIGNMENT|[257]|e|"common.apex.runtime.impl.DmlExecutionException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: []"|0x30f3a637

(791710185)|USER_DEBUG|[258]|DEBUG|PalatabilityRefusal_NewCaseController: Exception while submitting for approval: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: []
below is from Controller page

 
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
        req1.setComments('Auto-Submitted by controller for Approval.');
        req1.setObjectId(thisCase.id);
        
        System.debug('PalatabilityRefusal_NewCaseController:  Process Approval Request: '+ req1);
        Approval.ProcessResult result;
        try{
            result = Approval.process(req1);
            if (!result.isSuccess()){
                ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL, 'An Error Occurred when submitting the request.  Please contact your administrator.'));
                return (null);
            }
            System.debug('PalatabilityRefusal_NewCaseController: Successfully submitted for approval.');
        }catch(System.DMLException e){
            System.debug('PalatabilityRefusal_NewCaseController: Exception while submitting for approval: '+e);
            System.debug('PalatabilityRefusal_NewCaseController: Exception trace: '+e.getStackTraceString());
            System.debug('PalatabilityRefusal_NewCaseController: Exception details: '+e.getDMLId(0));
            System.debug('PalatabilityRefusal_NewCaseController: Exception details: '+e.getDMLFields(0));
            System.debug(thisCase);
            hasErrors = true;
            ApexPages.addMessages(e);
            return (null);
        }
W

We used to receive message in Approval Process Comments that "Auto-Submitted by controller for Approval." but right now we have to manually submit it. It's working fine in manual Approval. 

Somehow it stopped working through Controller. Let me know if you need more details to understand it better. 

What do you suggest. 

Thanks in advance. 
I have visualforce page on Community portal to create child case for followup. When they create child case, visualforce page shows Description of Parent Case automatically. We want to make description field as blank by default. Below is piece of code. I am not sure if below code is relevant, please let me know if not. 

<div class="form-group">
                                <label for="description" class="control-label">
                                   {!$Label.Portal_Case_Summary_Questions} *
                                </label>
                                <apex:inputField value="{!thisCase.Description}" label="" styleClass="form-control" id="description" />
                            </div>
                        </div>