• Krishna Katve
  • NEWBIE
  • -1 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 7
    Replies
Hi,

Gettting "Unable to send the template preview email. Uncheck 'Send email preview to' checkbox to continue with preview" error while trying to sent test and verify merge field fields in html email template.  Also workflow email alert which using this template is not able to send emails.

Can anyone help me with this issue?

Thank you
Krishna
 
I am getting below error while saving record using force:recorddata saveRecord methd.

{"state":"ERROR","recordId":null,"error":[{"message":"The requested resource does not exist\n","pageErrors":[{"statusCode":"NOT_FOUND","message":"The requested resource does not exist"}],"fieldErrors":{},"potentialDuplicates":[]}],"entityApiName":null,"action":{}}

Interesting thing about this is record is getting created in salesforce but respose is coming as error. Please check below save record call
 
component.find("apiRequestCreator").saveRecord(function(saveResult) {
                console.log("-----Save Result--"+JSON.stringify(saveResult));
                if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                    // record is saved successfully
                    component.set("v.message","API Request submitted successfully. Download API key from Display APi Request tab.");
                    helper.uploadFiles(component, saveResult.recordId);
                } else {
                    component.set("v.message"," Error occurred while submitting request, Please contact varian helpdesk.");
                    component.set("v.hasErrors", true);
                    console.log('Unknown problem, state: ' + saveResult.state +
                                ', error: ' + JSON.stringify(saveResult.error[0])+'---'+saveResult.error[0].pageErrors[0].statusCode);
                    if(saveResult.error[0].pageErrors[0].statusCode == "DUPLICATE_VALUE"){
                        var apiTypeKey =  component.get("v.customerDetails.Software_System__c")+", "+component.get("v.customerDetails.API_Type__c");
                        if(!$A.util.isEmpty(component.get("v.customerDetails.X3rd_party_Software__c"))){
                            apiTypeKey = apiTypeKey + ", "+ component.get("v.customerDetails.X3rd_party_Software__c");
                        }                            
                        component.set("v.message","You have already submitted request for "+apiTypeKey);
                    }else{
                        component.set("v.message"," Error occurred while submitting request, Please contact varian helpdesk.");
                    }
                }
            });



Please advise.

Thanks
Hi All,

I am getting
"This page has an error. You might just need to refresh it. Action failed: ui:inputSelect$controller$valueChange [Maximum call stack size exceeded] Failing descriptor: {ui:inputSelect$controller$valueChange}" error after selecting any value in ui:inputselect and there is no event written on it.

Inputselect tag from component:

<ui:inputSelect class="slds-input" labelClass="slds-form-element__label" label="Sales Org" aura:id="slsOrgPcklst" value="{!v.prepareOrderController.selectedSalesOrg}" disabled="{!v.prepareOrderController.quoteAlreadySubmited}">
                                <aura:iteration items="{!v.prepareOrderController.salesOrgs}" var="salesOrg">
                                    <aura:if isTrue="{!v.prepareOrderController.selectedSalesOrg == salesOrg.value}">
                                        <ui:inputSelectOption label="{!salesOrg.label}" text="{!salesOrg.value}" value="true"/>
                                        <aura:set attribute="else">
                                            <ui:inputSelectOption label="{!salesOrg.label}" text="{!salesOrg.value}"/>
                                        </aura:set>
                                    </aura:if>
                                </aura:iteration>
                            </ui:inputSelect>

Please advise.
Thanks in advance.

Hi All,

We are sending record attachments via apex sendEmail email to salesforce users.
But one of our user is getting email attachment file in unreadable format.
I tried to open the same file by going to Salesforce record and can see the file is good and readable. Also tried to send these record attachments via developer console to myself and all the files are coming good.

Please advise

Thanks
Krishna

Hi,

We can get all details of field using DescribeFieldResult class, but i am not able to find how to get created by and last modified by id for a field

Please advise.

Thanks
krishna
Hi,

Help text is not getting displayed on visualforce page.

<apex:pageblockSectionItem HelpText="{!$ObjectType.Opportunity.fields.Unified_Probability__c.InlineHelpText}">
    <apex:outputLabel value="Unified Probability"/>
    <apex:pageBlockSectionItem>
    <apex:inputField value="{!Opportunity.Unified_Probability__c}" id="unifiedProbability" label="Unified Probability"/>
    </apex:pageBlockSectionItem>
</apex:pageblockSectionItem>

Pleasae Advise.

Thanks
Krishna
Hi,

I am trying to send email from rest resource with attachments from records notes and attachments.
But i am receiveing email with strange behaviour.

1. I cant open one of the email attachments
2. I can open one of the pdf's but it has content of previous one
3. FIle contents are gettinf swapped between files.

***** I tried by executing same piece of code in developer console. it worked well

Below is sample code with hard coded values
@RestResource(urlMapping='/sendPDFEmail2/*')
Global class TESTSENDEMAIL{
    @HttpPost
     global static void sendEmail(String pobjQuoteId, String emailTemplate) {
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        string [] toaddress = new List<String>{'krishna.katve@gmail.com'}; 
        mail.setToAddresses(toaddress);  
        mail.setTargetObjectId('005c0000001hn1i');
        mail.setWhatId('a35c000000042bA');
        mail.setTemplateId('00Xc0000000MdL2');
        mail.setSaveAsActivity(false);
             
        List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
          
        List<Attachment> aList  = [select Name, Body from Attachment where ParentId = :parentId limit 10];
        
        for(Attachment a : aList){    
            Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
            efa.setFileName(a.Name);
            efa.setBody(a.Body);
            fileAttachments.add(efa);                   
        }
            
        if(!fileAttachments.isEmpty()){   
            mail.setFileAttachments(fileAttachments);
        }
        Messaging.SendEmailResult[] resultMail = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
     }
}

Please advise.

Thanks
Krishna

Hi All,

We are sending record attachments via apex sendEmail email to salesforce users.
But one of our user is getting email attachment file in unreadable format.
I tried to open the same file by going to Salesforce record and can see the file is good and readable. Also tried to send these record attachments via developer console to myself and all the files are coming good.

Please advise

Thanks
Krishna

I am getting below error while saving record using force:recorddata saveRecord methd.

{"state":"ERROR","recordId":null,"error":[{"message":"The requested resource does not exist\n","pageErrors":[{"statusCode":"NOT_FOUND","message":"The requested resource does not exist"}],"fieldErrors":{},"potentialDuplicates":[]}],"entityApiName":null,"action":{}}

Interesting thing about this is record is getting created in salesforce but respose is coming as error. Please check below save record call
 
component.find("apiRequestCreator").saveRecord(function(saveResult) {
                console.log("-----Save Result--"+JSON.stringify(saveResult));
                if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                    // record is saved successfully
                    component.set("v.message","API Request submitted successfully. Download API key from Display APi Request tab.");
                    helper.uploadFiles(component, saveResult.recordId);
                } else {
                    component.set("v.message"," Error occurred while submitting request, Please contact varian helpdesk.");
                    component.set("v.hasErrors", true);
                    console.log('Unknown problem, state: ' + saveResult.state +
                                ', error: ' + JSON.stringify(saveResult.error[0])+'---'+saveResult.error[0].pageErrors[0].statusCode);
                    if(saveResult.error[0].pageErrors[0].statusCode == "DUPLICATE_VALUE"){
                        var apiTypeKey =  component.get("v.customerDetails.Software_System__c")+", "+component.get("v.customerDetails.API_Type__c");
                        if(!$A.util.isEmpty(component.get("v.customerDetails.X3rd_party_Software__c"))){
                            apiTypeKey = apiTypeKey + ", "+ component.get("v.customerDetails.X3rd_party_Software__c");
                        }                            
                        component.set("v.message","You have already submitted request for "+apiTypeKey);
                    }else{
                        component.set("v.message"," Error occurred while submitting request, Please contact varian helpdesk.");
                    }
                }
            });



Please advise.

Thanks

Hi All,

We are sending record attachments via apex sendEmail email to salesforce users.
But one of our user is getting email attachment file in unreadable format.
I tried to open the same file by going to Salesforce record and can see the file is good and readable. Also tried to send these record attachments via developer console to myself and all the files are coming good.

Please advise

Thanks
Krishna

Hi,

Help text is not getting displayed on visualforce page.

<apex:pageblockSectionItem HelpText="{!$ObjectType.Opportunity.fields.Unified_Probability__c.InlineHelpText}">
    <apex:outputLabel value="Unified Probability"/>
    <apex:pageBlockSectionItem>
    <apex:inputField value="{!Opportunity.Unified_Probability__c}" id="unifiedProbability" label="Unified Probability"/>
    </apex:pageBlockSectionItem>
</apex:pageblockSectionItem>

Pleasae Advise.

Thanks
Krishna