• Alibaba
  • NEWBIE
  • 30 Points
  • Member since 2005

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 8
    Replies
Hi, there are many posts showing how to create formula fields for images and refer to the image in the Documents tab. In Lightning we have Files tab and not Documents tab. How do you get the image URL?
I have a VF custom quick action in the classic service console. It works great, but doesn't look anything like standard, non-VF quick actions. I've messed around with css, but I was hoping there was some shortcut to make my VF look like these. Turning on lightning style sheets doesn't help, just makes chunkier text boxes. I've also tried using pageblock and other standard apex tags, but no luck. Any ideas? Anyone?

Non-VF, Standard quick actions look like this:
Quick Action

While my VF Quick Action look like this (after trying to mess around with various CSS options):

Custom VF Quick Action
I have a simple Quick Action in the publisher that calls a basic VF page. After the VF page submit, I want to reload the VF page Quick Action so the user can enter another record. However, if there's an error, I don't want it to reload. I did this in JS, and it looks like this (note that I also updated the feed):
<script>
function refreshFeed() {
    Sfdc.canvas.publisher.publish({name : 'publisher.refresh', payload :{feed: true, objectFields: true, objectRelatedLists: {}}});
}
function Refresh(bool){
	//If insert succeeded, refresh the feed so update is viewable, and refresh this page.
	if (bool){
        refreshFeed();
        document.location.reload(true);
	}
}
Everything worked great, but recently, stopped working. Now, the reload code returns a "URL no longer exists" error.

NOTE: This is in a Sandbox, and there has been a Sandbox refresh, but I doubt that's the cause of this.

Has something changed in the Console functionality so that you can no longer do this? If that's the case, how can I do this properly? If I try to use the standard controller code to redirect to the current page, the page does not redraw.

Thanks!


 
Hello,

I'd like to open a VF page in a subtab from a detail-page button.

If I use a URL with 'Display in an Existing Window', the VF page will open in the existing tab. If I use 'Display in New Window', the URL will show up in a new browser window. I'm trying to use the Console Integration Toolkit, instead of srcup() or some other unsupported workaround.

I created a javascript button, and tried the following code, but nothing happens. Literally nothing, no error, no page opening. What am I doing wrong? Help would be greatly appreciated.

{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/support/console/36.0/integration.js")}
sforce.console.getEnclosingPrimaryTabId(callOpenSubtab);
var callOpenSubtab=function callOpenSubtab(result) {
            sforce.console.openSubtab(result.id, 
               '/apex/vfpage', true, 'New Case');
}
 
When a VF page fails a validation on Save, I want to show the error. This I can do by returning null from the controller (if I return a reference to the same page, the error doesn't display). The user then should theoretically go to another record to fix the issue causing the validation problem (which is on a different record).

However, if the user hits Save again, I get in trouble because the CaseComment id is already set (I get "Cannot specify ID in an insert call").

Right now, I'm simply getting a new CaseComment object when the first Save fails. Is there a  more elegant way of doing this?

Thanks!

 
Hi, I was wondering if anyone has seen the following behavior:

I have a custom button (actually a few of them), that creates a VF page with a custom controller so I can create a mix of Case/Opportunity on one page. I pass a few variables to the controller using the  ApexPages.currentPage().getParameters().get('varname') function.

It works perfectly more than 99% of the time. Once in a while though, the variables are simply not passed or have a null value. I cannot recreate the bug, so it's very difficult to debug. Even if I turn on the logs, they always go past the allowed 20 calls before being disabled.

Is this a strange bug in SF? Should I not be passing parameters this way?

Thanks very much

Hi,

 

I need to create a dashboard (or report graph) that will be displayed on a large flat-screen monitor for the entire office.

 

I need the underlying report to be refreshed every hour. Unfortunately, SF limits auto refresh of dashboards or reports to once a day.

 

Has anyone tried to override this by writing Apex / VF code to display the dashboard or report graph and refresh it every hour? Does it work? Any other ideas for getting this done reliably?

 

Thanks in advance!

I am getting an error every time I try to install Force.com IDE. I get:

 

java.io.IOException: CreateProcessEX Failed with 740

 

I've tried reinstalling JRE. The IDE itself, etc. Any ideas? It used to work.

 

Thanks in adance!

 



Hi,

 

I'm trying a fairly simple call of an Apex method from a custom detail button in Account. The argument I need to send is the Account object itself. I don't know how to reference it. I tried the example from the Apex development guide, which is:

 

{!requireScript("/soap/ajax/15.0/connection.js")}
{!requireScript("/soap/ajax/15.0/apex.js")}
var acct = sforce.sObject("Account"); 
var id = sforce.apex.execute("myClass","makeContact",
                             {lastName:"Smith",
                              a:account});

 

Even if I comment out the call to apex, the line

var acct = sforce.sObject ("Account");

Gives me an error:  Object doesn't support this property or method.

 

I also tried through a global variable

var acct = $ObjectType.Account;

But that doesn't work either.

 

What am I missing? How do I reference the Account object in a button?

 

Thanks very much.

Hi,
 
I want a e-mail to go to a customer when an Account rollup field (rolled up from Opportunity) reaches a certain threshold. However, I want the e-mail to go out only once per month.
 
I set up a workflow rule to trigger when the threshold is reached, however, it triggers every time the rollup is changed.
 
I figured I'd create another field (e.g. 'E-mail Sent' checkbox), and set it when the workflow is fired. However, I can't figure out how to reset the checkbox automatically on the first of the month (workflows only work when something is edited).
 
Anyone have any ideas? Work-arounds?
 
Thanks very much.
Rafi
Hi All,

Can you please help me on below things.
Scenario:
---------------------------
I have one VF page which contains 2-page blocks.
On block contains insert operation and the second block contains displaying the list.
When I enter Account name click on submit button only second block needs to be refreshed not the entire page.
VF Page
---------------------
<apex:page controller="Action_Function_scenario_Controller" sidebar="false" lightningStylesheets="true">
<apex:form >

<apex:pageBlock >

<apex:actionFunction action="{!Submit}" name="Submit" reRender="sec"/>

   Account Name :: <apex:inputText value="{!accname}"/>
  <apex:commandButton value="Submit" onclick="doUiSubmit();return false;" id="checkBtn"/>
</apex:pageBlock>


<apex:pageBlock title="Displying List of records" id="sec">
  <apex:pageBlockSection title="Account list" collapsible="false">
    <apex:pageBlockTable value="{!acclist}" var="a">
        <apex:column value="{!a.name}"/>
        <apex:column value="{!a.rating}"/>
        <apex:column value="{!a.industry}"/>
        <apex:column value="{!a.description}"/>
    </apex:pageBlockTable>
  </apex:pageBlockSection>
</apex:pageBlock>


</apex:form>
</apex:page>

Controller
------------------------
public with sharing class Action_Function_scenario_Controller {

    public string accname{get;set;}
    Public list<Account> acclist{get;set;}
    
    public Action_Function_scenario_Controller()
    {
       acclist = new List<Account>();
       
       acclist = [select name,rating,industry,description from account order by createdDate DESC limit 10];
    }
    
    public PageReference Submit()
    {
       Account ac = new Account();
       ac.Name = accname;
       
       insert ac;
       
       return null;
    }
}
Hi, there are many posts showing how to create formula fields for images and refer to the image in the Documents tab. In Lightning we have Files tab and not Documents tab. How do you get the image URL?
When a VF page fails a validation on Save, I want to show the error. This I can do by returning null from the controller (if I return a reference to the same page, the error doesn't display). The user then should theoretically go to another record to fix the issue causing the validation problem (which is on a different record).

However, if the user hits Save again, I get in trouble because the CaseComment id is already set (I get "Cannot specify ID in an insert call").

Right now, I'm simply getting a new CaseComment object when the first Save fails. Is there a  more elegant way of doing this?

Thanks!

 

Hi All,

 

I have a pageblock table in a visualforce page say created for object Opportunity …

 

Inside  the page block table I created another one table for object Product…..

 

I used Map like Map<Oppty,List<Product>> to populate Opportunity values and corresponding product values in to the table

 

and the table is editable to add new values……..

 

In Edit Mode ,I have added “AddRow” link to add new rows in the table and Delete Row link to delete a particular row in the  table….

 

Since I am using using the Map in the page block table I am not able to write a method for “Delete Row” link ...

 

Please anyone suggest..

 

 

Hi,

I followed the instructions and setup Google Maps custom tab.

When I access this custom tab, I can see the Google map, but none of the accounts/leads/contacts are mapped.

All my search conditions, returns with "Search Complete, 0 records mapped.".

In some search conditions, I got popup messages saying that "50 of 211 records processed. Would you like to continue mapping more records?" etc, but at the end of it, nothing gets mapped.

I am checking this with Developer Edition. Is that a reason why this is not working?

Any suggestions?

Thanks,
Ayyappa