5

On a project for a client I am using a field on Opps as part of a conditional formula field on Opps Prod. The result of that formula needs to be able to be summed from all Opp Prods, and the total displayed on the Opp.

Wha wha. :( Cross-Object formula field, so I cannot Roll Up that quantity.
Wait, No problem, work flow rules! Oh wait, Professional Edition.

Then I thought maybe I could use a button on the Opp Prod list, where one checks all the Opp Prod and then clicks the button to pass a value from the Opp to a field on the Opp Prod, that way it's not referencing something on another object; that value is THERE on the Opp Prod.

Wha wha. No API. No access to libraries.

As a non-coder, this leads me to the question "What is the purpose or functionality of OnClick JavaScript in Professional Edition"? With other features you can't use on lower editions, SFDC generally locks you out so you don't waste your time. What is it that you CAN accomplish with an OnClick JavaScript button in Professional Edition?

Oh, and Roll-Up Helper will not be an applicable solution to my original issue, so if you were thinking of it thanks, but not going to work this time.

2 Answers 2

5

Just because you're on Professional Edition doesn't mean you can't take advantage of onclick behaviors.

  1. Professional Edition API. While not documented, it is sometimes possible to purchase the API for Professional Edition independently.

  2. AJAX Proxy. Even without the API, you can still access remote sites in JavaScript through the proxy. You can access Facebook, Twitter, Amazon S3, etc.

  3. Screen Scrapes. You can, with some care, programmatically manipulate pages into performing simple tasks, such as changing a field value. Page Layout restrictions apply, however, so you can't bypass locked or hidden fields.

  4. Reporting. While you don't get the fancy Analytic API, you can still run basic reports, and get the output in HTML or CSV format. Combine this with the prior entry, and you have basic roll up summary capability.

  5. You can send data to remote locations, great for interfacing with external systems. For example, its possible to send a lead to a marketing program somewhere, or update an external system's inventory levels.

  6. Page Overlays. You can show related information, possibly from an external source, with a floating iframe. As discussed already, you have several ways you can get at this data.

  7. Visualforce Pages. You can access page data from Visualforce. Visualforce allows some pretty inventive techniques, despite not having any controller code available.

I've barely scratched the surface here. While it is non-trivial to get at salesforce.com data (even without the API), there's still a wealth of other things that can be accomplished.

Finally, please allow me to astonish you with a Visualforce page that at least nudges you in the right direction: getting a quantity value in Professional Edition. No queries, no Apex Code, and consumable directly within the JavaScript through standard the standard JSON library (via JSON.parse).

<apex:page standardController="Opportunity"
           showChat="false" showHeader="false" 
           contentType="application/json">
    <apex:variable value="{!0}" var="sum"/>
    <apex:repeat value="{!Opportunity.OpportunityLineItems}"
                 var="lineItem">
        <apex:variable value="{!lineItem.Quantity+sum}" 
                       var="sum"/>
    </apex:repeat>
{!sum}
</apex:page>
0

This is awesome! I have been struggling in a PE org with the inability to roll up formula fields or use workflow to update in the Quote Line Items, and your solution worked like a charm! I created a formula field that gives the line item cost via a custom field on the product object and this worked:

{!sum}

I then added it to the Quote layout as a VF page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .