• AnshulVerma
  • NEWBIE
  • 49 Points
  • Member since 2008
  • Sr. Manager


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 28
    Replies
Are deterministic formula fields auto indexed by salesforce platform?
We have a requirement where we need to connect to salesforce from an intranet website with code written in JavaScript. We have the ConnectedApp created in Salesforce and we are following Username-Password OAuth2 flow. We are passing all the required parameters given below. We are POSTing this to the request URL given below.

var requestUrl = 'https://login.salesforce.com/services/oauth2/token';
requestUrl += '?username=USERNAME&password=PASSWORD_SECURITY_TOKEN&grant_type=password&client_id=CLIENT_ID_FROM_CONNECTED_APP&client_secret=AGAIN_FROM_CONNECTED_APP;
We tried connecting using JQuery AJAX call and JSforce libraries. We have also whitelisted the required domain in Salesforce via Setup --> Security Controls --> CORS.

We tried connecting to salesforce via the intranet site as well as another salesforce org using the same code. for both of the situations we are getting below error. 

User-added image

In case if image does not load 
 
XMLHttpRequest cannot load https://login.salesforce.com/services/oauth2/token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://lightningcheck-dev-ed--c.ap2.visual.force.com' is therefore not allowed access.

The origin is there in the Request Header as checked in Browser Console, however, the 'Access-Control-Allow-Origin' parameter is not there in response header from Salesforce.

Am I missing any setting here or it is not something Salesforce currently supports? Any help appreciated, thanks.
 
How would I go about making two separate lists of items in my scope in a batch that return different records based on criteria? I want to send out separate emails to each list.
Hi Trailheaders!  Has anyone completed the Challenge for the "Automated Time-Based Actions with Workflow" section.

I am getting this reason: The 'Set Case to Escalated' Workflow field update action was not found

It states in the Challenge: NOTE: Since Workflow rules only fire on record save, normally you would implement this with a time-triggered workflow action...so I created it as a Time-Based action.

User-added image

Has anyone completed this Challenge successfully?



 

Hi All,

 

When we can use permission set ?Give Examples 

 

 

Thanks,

 

Vicky

Hi,

 

How can i get details of related to ie the WhatId of Task Object in SOQL.

CustomObject has a field as Name

Example : Task t1 is related to CustomObject

SOQLQuery could be [SELECT id,whatid from Task];

This will result me in taskid and the customObject record id but what if i need that complete record of customObject.

 

 

 

Appriciate any inputs on this in advance
Thanks.

Hi,

 

I have create Force.com Sites login and enabled it for our Customer Portal Users and it is working fine. We created the Site Login page using the standard page provides by Salesforce and customized css and designs for the page keeping the core functions and code of the page intact.

 

We provide the link to the login page to our users or redirected them to the login page when they clicked on the links in our website.

 

Now we have a requirement where we want the login available in the same page instead of a link. (meaning no redirects to the existing login page) For example like the Facebook login page. So when the user go to our website

http://ourwebsite.com/customerportal, they will have the login, forgotpassword and new user registration options there. So they can enter their username and password there and then go to the portalHome page.

 

The existing loginpage (visualforce and apexcontroller) still works fine. Need to move the login to our website which is using ASP .Net and C#.

 

Can this by achieved? What is the best way to get this done?

 

Thanks

KD

Hi,

Am unable to refresh any of the resources in the IDE from the server.

When am trying to refresh a page from the web, getting an Exception saying:

 

 

Unable to refresh resource 'MileaeExension.cls':
com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Unable to refresh resource 'MileaeExension.cls':


com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Please assist to rectify the issue. 

 

Thanks in advance,

VNath

I'm curious what is the best way to host images for CMS type sites. Let's say I have a custom object called Building. It has some fields such as Height, Number of Floors, Year Built, etc. I'd also like to attach an image of the building to the record. Then I have a custom visualforce component that pulls all this data and image into a nice clean output.

 

There appears to be no good way to handle the images. RTF are not an option as the output is impossible to work with. Attaching as documents is like building something with toothpicks and bubble gum as it requires exact naming of the documents so they can be queried properly.

 

There used to be an idea for an image field type that would address this issue perfectly. Upload a single image to a field and then when outputting this field you would get a simple <img> tag. Ideally there would also be something like this: http://sites.force.com/ideaexchange/ideaView?c=09a30000000D9xt&id=08730000000BrdBAAS

Hi,

 

Here I am doing some crazy stuff. I get givenDateTime from controller and capturing it to a dattime variable using constructor of BatchApex. I want to use this dattime variable in quey. But when I use 'dtGMT' variable in quey i got some conversion errors. so, I converted GMT time(default sFDC object store GMT time) to MST time. then its working fine. But now i thought I did crazy stuff for date.. Do any work around for this without converting from GMT to MST. 

 

Appreciate any suggestions. Following is the sample code I created.

 

 

 

    global BatchMemberList (ID CampId, dateTime givenDateTime)
    {
        CampaignId=CampId;
        dtGMT= givenDateTime;
    }

    global Database.Querylocator start(Database.BatchableContext BC)
    {
      
        //converting GMT to MST and getting individaul values from the datetime

        String dtMST = dtGMT.format('yyyy-MM-dd HH:mm:ss', 'MST');
       
        String Year = String.valueOf(dtMST.substring(0, 4));
       
        String Month = String.valueOf(dtMST.substring(5, 7));  
       
        String Day = String.valueOf(dtMST.substring(8, 10));
       
        String Hours = String.valueOf(dtMST.substring(11, 13));
       
        String Mins = String.valueOf(dtMST.substring(14, 16));
       
        String Secs = String.valueOf(dtMST.substring(17, 19));

        system.debug('dtGMT'+dtGMT);
        //Datetime format
        system.debug('dtPST'+dtMST);

        string stringDateFormat = Year + '-' + Month
                                       + '-' + Day+'T'+Hours + ':'
                                       +Mins + ':' + Secs+'Z';

        system.debug('stringDateFormat'+stringDateFormat);
       
        //Query

        query = ' select  First_Name__c,Last_Name__c,State__c, '+
                '    Zip_Postal_Code__c,Comments__c ' + 
                '  from Member_List_Stage__c '+
                ' where createdDate > '+stringDateFormat+'' ;

I am getting the "too many dml statements" error when I do a bulk update.  I realize that the problem is that I have an insert statement inside a for loop but I am unsure of how to resolve the issue.  How do I get the fields I want to update into a map or list so that I can then update them all at once?  I am confused about the syntax...Here is the portion of my code that is giving me a problem... thanks!!!!!

///Part 2 B update //if health, update the health market if (HealthGo) { for(Account a: accts){ a.Health_Market__c=Market; a.Health_Renewal_Date__c=RenewalDate; a.Health_Underwriter_Assigned__c = Underwriter; update accts; } } else{ } //if dental, update the dental market if (DentalGo) { for(Account a: accts){ a.Dental_Market__c=Market; a.Dental_Renewal_Date__c=RenewalDate; update accts; } }

 

Hi all,

 

I have an issue about upload a *csv file to Force.com. My customers want to upload a *csv file to force.com but do not like to use dataloader, I must develop VisualForce page that allows customers can upload file, so anyone can help me this problem??? Please!!!

Hi, pageblockTable is displayed differently in IE & Firefox & others, specifically some borders are missing in some blank cells.

 

 

Showing correctly:

 

 

How to make it display the border for all cells? i have border="1" in myVF markup.

 

Thanks.

 

I have a workflow rule with an outbound message action and an email alert. I'm receiving the email but the outbound message doesn't seem to hit my web service (IIS log stopped showing activity).  If I hit the web server, I see the activity but I'm not seeing anything from SalesForce (Jakarta).

Also, there are no entries in the outbound messaging monitor.

How do I verify that messages are being sent?  Is there a log that shows every outbound message and the message body?

I've been pouring over the docs and forums but haven't been able to determine if there's a way to set the http response code on a call to a visualforce page.

 

For example, I'd like to return 500 if I encounter an error in my Apex code and 200 if everything works.

 

 

Thanks,
Can we enable Salesforce Content for Dev Orgs? If so, how?