• laura.mckevitt@bakertilly.com
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 29
    Replies

Does anybody know how I can total a count of the summarized groups in a report.

 

i.e. Say I have an object model like

 

Parent object

Child object (look up relationship to parent)

 

and Data like

 

Parent 1

Child A

Child B

Parent 2

Child C

Child D

Parent 3

 

I then do a report based on the Child object and group by the lookup field to parent

 

Using recordCount, I can get the total # of records on the report (i.e. 4)

 

What I would like is to see the total of all Parent objects (with children) - in the example above 2

 

 

Hello,

 

I am trying to construct a class that gathers a list of specific accounts in Salesforce, serialize in JSON, and then I can display my string in Visualforce. I am most likely forgetting something here, but any help would be much appreciated...the following error I get is: Non-void method might not return a value or might have statement after a return statement.

 

APEX CLASS:

public with sharing class JSONController {

public String jsonString {get;set;}

//Constructor
public JSONController()
{
jsonString = getAccounts();
}

public String getAccounts(){
List<Account> accounts = [
SELECT Name, ShippingStreet, ShippingCity, ShippingState, ShippingPostalCode, Phone, Website, Latitude__c, Longitude__c
FROM Account
WHERE Latitude__c != null
AND Longitude__c != null
AND Account_Status__c = 'Active'
AND RecordTypeId in (SELECT Id FROM RecordType WHERE Name = 'Retail Account')
];
String accountsJSON = JSON.serializePretty(accounts);
}
}

 

VF PAGE:

<apex:page controller="JSONController" contentType="application/x-JavaScript; charset=utf-8"
showHeader="false" standardStylesheets="false" sidebar="false">
{!jsonString}
</apex:page>

I have created a website in which many pages are served up dynamically using data repeaters. The site works well, but I don't know a good way of storing elements such as an embedded YouTube video in a custom object. Similarly, it would be nice to be able to set some headers with HTML tags <h1> or bullets and have it rendered correctly in Site.com. Is there any practical way of doing this?

Hi all,

 

           i have create a left navigation using menu(navigation), in that parent and child relations ship. like

Product1

     subprodut1

      subprodut2

product2

           i created css for menuitem-selected but how to create when child element selected also apply css parent also  

my css for 

 

parent :#sidebar_left .left_navigation li.menuitem-selected

 

for child :#sidebar_left .left_navigation li ul li.menuitem-selected

 

        when select child record the parent record also apply parent css but my css styles is not applied 

 

Thanks 

Does anybody know how I can total a count of the summarized groups in a report.

 

i.e. Say I have an object model like

 

Parent object

Child object (look up relationship to parent)

 

and Data like

 

Parent 1

Child A

Child B

Parent 2

Child C

Child D

Parent 3

 

I then do a report based on the Child object and group by the lookup field to parent

 

Using recordCount, I can get the total # of records on the report (i.e. 4)

 

What I would like is to see the total of all Parent objects (with children) - in the example above 2

 

 

Hi,

 

I need to implement a REST service that returns data in JSONP format (JSONP format required for cross-domain ajax calls). I'm calling this service by jQuery ajax. But it always raises error : Error jQuery17109439062654184185_1342893046903 was not called.

The reason is that REST API only supports JSON and XML. In this case JSONP always returned as a XML. I'm wondering is there any workaround for this?

 

Here is my apex code:

 

@RestResource(urlMapping='/BookingService/*')
global class noqBookingService {

global class BookingStatus {
    global String ReferenceId { get; set; }
    global integer Threshold { get; set; }
}

@HttpGet
    global static String getQueueStatus() {
        String referenceId = req.params.get('referenceId');
        String jsonp_callback = req.params.get('callback');
        
        BookingStatus status = new BookingStatus();
        status.ReferenceId = referenceId;
        status.Threshold = 8;
        System.debug(jsonp_callback+'(['+JSON.serialize(status)+'])');
        
        return jsonp_callback+'(['+JSON.serialize(status)+'])';        
    }    
}

 Visualforce code:

 

$(document).ready(function() {
        $.ajax({
            url:'https://My-Site-Domain/services/apexrest/BookingService?callback=?',
            type:'GET',
            dataType: 'jsonp',
            contentType: 'application/javascript',
            success: function(status){ alert('success');},
            error:function(xhr, ajaxOptions, thrownError){ alert('error:'+thrownError);}
        });
    });

 

  • July 21, 2012
  • Like
  • 0

Hello,

 

I am trying to construct a class that gathers a list of specific accounts in Salesforce, serialize in JSON, and then I can display my string in Visualforce. I am most likely forgetting something here, but any help would be much appreciated...the following error I get is: Non-void method might not return a value or might have statement after a return statement.

 

APEX CLASS:

public with sharing class JSONController {

public String jsonString {get;set;}

//Constructor
public JSONController()
{
jsonString = getAccounts();
}

public String getAccounts(){
List<Account> accounts = [
SELECT Name, ShippingStreet, ShippingCity, ShippingState, ShippingPostalCode, Phone, Website, Latitude__c, Longitude__c
FROM Account
WHERE Latitude__c != null
AND Longitude__c != null
AND Account_Status__c = 'Active'
AND RecordTypeId in (SELECT Id FROM RecordType WHERE Name = 'Retail Account')
];
String accountsJSON = JSON.serializePretty(accounts);
}
}

 

VF PAGE:

<apex:page controller="JSONController" contentType="application/x-JavaScript; charset=utf-8"
showHeader="false" standardStylesheets="false" sidebar="false">
{!jsonString}
</apex:page>

Hello everyone,

 

I'm trying to configure a simple website using site.com in a demo org. How can we publish this site?

We have different pages that already exist and they have URLs as "www.abc.com/xyz.html". But on Site.com, since the content is dynamically generated, the URL is now "https://sitepreview.na2.force.com/page?id=a004000000dahmEUAA" where the content of the page is generated based on the id.

 

When the site will go live with existing domain, would it have URL as "www.abc.com/page?id=a004000000dahmEUAA"?

 

Is there any way to ensure that the new URLs generated when the site goes live be same as the existing URLs for the site so that search engines can list them?

  • June 13, 2012
  • Like
  • 0

Hi All,

 

We are in the process of building out a new public facing internet site using Site.com CMS system.

Our existing site consists of a hybrid of public facing content and customer applications spread across subdomains.

 

If we deploy our www.<ourdomain>.com to Site.com, would we still be able to host our own custom applications on any of our subdomains (outside of Site.com) (e.g. apps.<ourdomain>.com) ?

 

Thanks much,

 

Yuri Lausberg

Hi All,

 

 

How we can display the image/document (PDF/XLS) that we have uploaded in salesforce Attachment / Document object in site.com (it should be available publically)?

 

 

 

Any pointers on this would help.

 

Hi all,

 

I am new to site.com. I need to use the value of repeater element (shown as a link) which it is fetching from salesforce when i click on it. e.g i want it in available in javascript.

 

Thanks in advance.

Regards

Abhishek Gupta

I am trying to displsy content in Site.com but I am not able to use content management in Site.com.

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