• Talha Saqib
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 21
    Replies
Hello, I need to create web-to-lead form, in which instead of a product interest, there should be a product(lookup). How correctly to do this ?
 
I to create in Lead object custom field Product (Lookup) , but in web-to lead in Advanced fields this not watched(
User-added imageUser-added image
Hi Experts,

I'm facing below issue while I'm accessing my local website(remote site) to Salesforce application. Assume like https://mystie.com(remote website or localwebsite). I'm trying to make an AJAX call to Salesforce and that gets blocked.

Access to manifest at 'https://hr-mysite.my.salesforce.com/visualforce/session?url=https%3A%2F%2Fhr-mysite--fhcm2.um5.visual.force.com%2Fresource%2F1595939225000%2Ffhcm2__collaborationportal%2Fmanifest.json' (redirected from 'https://hr-mysite--fhcm2.um5.visual.force.com/resource/1595939225000/fhcm2__collaborationportal/manifest.json') from origin 'https://hr-mysite--fhcm2.um5.visual.force.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Plesae refer Salesforce landing page console error.

Landing page console issue.

Above image if i do clockin post request will come but here post request gets blocked( All are Ajax call). i attached falid request screenshot.

Post request get failed inside salesforce application.
Note: Its was working fine end to end apllication  
Hi,
I have created an EmailMessage, but I cannot fetch the name of the attachments through "EmailMessage.Attachments", so how? Any examples?
Hi Friends I have a form that I need to write in Visualforce because it must be exportable to PDF. I  was using CSS Grid for my layout but when I switched to renderAs="PDF" my grid formatting was gone. If I add floats the PDF responds. Am I a making a mistake or does the  CSS Grid not work with the PDF? Here is my <head> 
 
<apex:page id="Region_Health_Check" showHeader="false" standardController="Region__c" docType="html-5.0"
    sideBar="false" standardStylesheets="false" renderAs="pdf">
    <head>
        <title>Region Health Check Report</title>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <apex:stylesheet value="{!$Resource.HealthCheckStyle}"/>
    </head>

CSS forgive having floats and grid in place. 
/* HealthCheckStyle */
@page{
    size: letter;
    margin: 25mm;

}

body{
    font-family:  BrownStd,serif;
    font-size: 14px;
    display: grid;
}
.top{
    display: grid;
    grid-template-columns: repeat(10, 10%);
    grid-template-rows: auto;
}
.score-label{
    grid-area: 1 / 9/ 2 / 10;
    font-size:  12px;
    float: right;
}
.engagement-label{
    grid-area:  2 / 1/  2 /4;
    font-size: 26px;
    font-weight: bold;
}
.final-grade{
    font-size: 39px;
    font-weight: bold;
    grid-area: 2/9/4/10;
    float: right;
}
.region-name{
    font-size: 24px;
    grid-area: 3/ 1/ 4/ 3;
}
hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid red;
    margin: 1em 0;
    padding: 0;
}
h4{
    font-size: 14px;
}

 
Hi , 
I am working on Lightning, and trying to use export to excel in javascript controller.
I need to export data in two/three sheets of a single workbook. Like 1 sheet will contains open cases, 2nd sheet will contain closed cases etc.
I found few blogs but they are working fine to export data in one sheet, but I want to export data in multiple sheets of 1 workbook.
Can anyone plese help.
I am facing cross domain error on ajax request in javascript

Ajax Request
 
$.ajax({
                    url:"../oppitm/lineitemsort.jsp?id={!oppID}",
                    contentType:"text/html",
                    xhrFields:{withCredentials:true}
                    }).done (
                    function(data){console.log(data)});
Error
XMLHttpRequest cannot load https://ap1.salesforce.com/oppitm/lineitemsort.jsp?id=00690000007jIM1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://nsp-demo.ap1.visual.force.com' is therefore not allowed access.

I have enabled below origin urls in CORS
  • https://*.salesforce.com
  • https://ap1.salesforce.com
  • https://nsp-demo.ap1.visual.force.com
Please suggest or any workarounds how this can be resolved
Hi Folks,

I need to get the attachments from EmailMessage. Is there any way to get it ? EmailMessage object has a property called hasattachments but how to get attachments and its body ?

Regards,
Ajay
How to put URL dynamically in HTML email template, i want to populate url dynamically otherwise on every instance i have to chance the URL.

Some one please suggest me what we have to do here.
Hi,
Can we export list of records from a lightning page to Excel sheet on click of button?In VF pages we use ContentType ,how can we do the same in Lightning?

Thanks in advance
Hi All,

I am trying to load a .stl file on visualforce page by embedding JS based .stl viewer.
.stl file is actually located in AWS S3. And when I try to access it, I am getting below error.
XMLHttpRequest cannot load https://s3.amazonaws.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://c.na29.visual.force.com' is therefore not allowed access.

Will enabling CORS at the server side will solve the issue? Is there any other way to solve this issue?
Is there any security issues on doing the same which can affect my security review while I publish app?
I am trying to send $http request to salesforce for submitting a ticket.
I enabled in security setting cors while adding my site to the withlist.
The probelm is that i am still getting the famous error:
XMLHttpRequest cannot load https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mystie.com' is therefore not allowed access.

Code:
$http({
                method: 'POST',
                url: 'https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8',
                headers: { 'Content-Type': 'application/json' },
                data: param2
            }).
Thanks in advance for your help.
Dan

We'd like to populate the date field on a web to lead form with a bit of background javascript. I am aware the date format should be based on the org's Default Locale, and as such the format might be different for the US or UK.

 

The issue is that we'd like to populate the date field regardless of the local. The reason for this is that we'd like the javascript to work on other people's web-to-lead sites, regardless of their local.

 

Is there any ISO format for the date that will work with a Web to Lead, like YYYY-MM-DD, or YYYY/MM/DD? I have tried both of these and they don't seem to work.

 

For reference, here is Salesforce's instructions (http://na11.salesforce.com/help/doc/en/setting_up_web-to-lead.htm) where they say:

 

The format for date and currency fields captured online is taken from your organization’s default settings - Default Locale and Currency Locale.

 

Thanks!

  • February 13, 2013
  • Like
  • 0

Hi there,

We have a lookup field on LEADS point to Accounts. The Web To Lead Form does not display the Lookup field called "Reseller", and I am not sure what HTML element should be used to grab the data from the Web Form and then populate into the look up field into LEADS object.

We have tried using something like this:-

Reseller: 

 

 

Reseller:<input  id="00N80000004nbGG" maxlength="100" name="00N80000004nbGG" size="20" type="text" /><br>



This is not working.

On the Web Form the field Reseller is a picklist while in SFDC we are trying to populate into lookup field.

How should this be resolve, what do we need to do on our web form to populate this value into SFDC under the lookup field.?

Hai,

 

     I applied 'Like' Operator on number field in the SOQL query.But it Showing an error that Like operator will not work on Number field types.

 

 I had the Number type field in database and also i Dont want to change the type here.

 

Then how to aplly 'Like' operator on number field in SOQL.Is there any other way to check the number starting with,like the functionality of 'Like' Operator.

I have a web to lead web form where all other data is getting inserted but not the date field.

It is a date field not a date/time field and we are putting date in UK standard DD/MM/YYYY.

 

I also tried standard SFDC format that is YYYY-MM-DD, still it is facing the problem..what can be the possible issue ??

Hi all,

 

I have been trying to map a picklist value from our company website to a custom lookup field on the Leads object.  We have successfully mapped a campaign value from our website to the Campaign lookup field on the Leads object, but we can't seem to get this to work.

 

Here is the successful Campgin map: '70130000000fbri' AS 'Campaign_ID',

 

The value that we are trying to pass is: '0013000000u3Yj0AAE'

The custom lookup field is called: Master_Agent__c

The custom lookup field ID is: 'CF00N30000007ZIUmj_id0_j_id2'

 

Can anyone give me some guidence on this one.  I know this can be done, but I cannot figure out how to pass it to a custom lookup field.

 

Thanks,

Alex

 

Hi
 
We are generating a new web to lead form, which includes a custom date field.  
 
The form is for our UK web site, so dates entered will be dd/mm/yyyy.
 
Problem is SFDC uses the organisationalal defaulted time-zone.  therefore translates it to a US date format.  
 
I'm sure some of you UK users out there must of expeirenced this problem and have a work around.   Can this be fixed on the code?  is there anyway I can use a formular field to calculate the date.
 
Thank you for your help!
 
Regards
 
 

Though, this not exactly an sforce questions, I hope someone here can help me.  I have a web-to-lead form that includes a custom date/time field that was created on the lead form.  No matter what I type in this field, it does not get updated to the field in SalesForce.  What gives?  Does anybody know or has gotten this to work?

Thanks in advance. - Hal

  • December 09, 2004
  • Like
  • 0
How to make lightning datatable inline edit field mandatory ?
Or
How to make a field mandatory in lightning data table?