• Mahmoud Abdelsalam
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi All ,

I'm new to salesforce and i'm wondering whether i could use "Hightlights Panel Component" inside my custom component. is there some sort of tag that i can use it on my view or somthing.

Thank you !
Hi All ,
I'm new to Salesforce and i wonder how i can conditionally display visualforce page on account page upon that button click as illustrated on image .User-added image
Hello All , 
I need to pass dynamic parameter to force:canvasapp , i tried the following code but actually it does not work : 

Controller  : here i retrieve some specific data from account standard controller , and i have a property named customerData in order to save a json formatted string .
public with sharing class CustomerDataController {
    public String customerData { get; set; }
  

    // Constructor method for the controller
    public CustomerDataController (ApexPages.StandardController stdController) {        
        Account account = (Account)stdController.getRecord();
        account = [SELECT Name, AccountNumber, BillingStreet, BillingCity, BillingState, BillingPostalCode, BillingCountry FROM Account WHERE Id = :account.Id][0];
        
        String accountNumber = account.AccountNumber == null ? '' : account.AccountNumber;
        String billingStreet = account.BillingStreet == null ? '' : account.BillingStreet;

        JSONGenerator gen = JSON.createGenerator(true);
        gen.writeStartObject();
        gen.writeStringField('AccountNumber', accountNumber );
        gen.writeStringField('AccountStreet', billingStreet);
        gen.writeEndObject();
		
        customerData = gen.getAsString();
    }
}
Lightening Component
<aura:component  implements ="force:lightningQuickAction">
     
  <force:canvasApp scrolling="auto"  applicationName="Development Canvas"  
                    developerName="Development_Canvas" 
                    width="1200" height="1200"
                    maxWidth="infinite" maxHeight="infinite"
              
                   parameters="{!customerData}"
                   />
</aura:component>

looking forward to your valuable response ,Thank you much !

 
Hello,

When using force:navigateToURL to redirect to an external address it opens in a new tab. How can I replace the current window with the new URL?

​Thanks.

Hello All,

 

I have a custom page and controller.  I am trying to do some error handling within the controller as such:

 

public PageReference sendMail2PM(){
   

string PMID = [select Deliverable_Owner__c from P4_Contract_Deliverable__c where id = :this.cd.id].Deliverable_Owner__c;

 

string PMEmail = [select email from contact where id=:PMID].email;

 

if(PMEmail==null){
    PageReference errorPage = new PageReference('https://cs1.salesforce.com/apex/errorLanding');
    errorPage.setRedirect(true);
    return errorPage;
    }

 

}

 

My problem is that when the redirect happens, somehow "inline=1" gets appended to the URL.  It seems that when the inline parameter is present then the page renders without headers or sidebars.  I want the header and sidebar so users know they are still in saleforce.

 

Where is the "inline=1" coming from and how do I get rid of it?  Or else how do I make the redirect happen with headers and sidebars?

  • February 05, 2009
  • Like
  • 0
Hi everyone,

I've posted about similar issues before, and searched the forums, and I apologize if there's a solution that I've missed in here somewhere; here's the problem:

From a Lead (or anywhere, really, but let's keep it simple), I have custom buttons triggering S-Controls that
  • update fields on the lead, and
  • create new custom objects with lookups to the lead
A page is displayed with a brief comment indicating what's happening in the background, and then the user is returned to the original page so that they can continue with what they're doing. 

The Lead detail is not refreshed, however, so there is no indication that anything really happened.  I've tried using setTimeout() to give the page time to refresh, to no avail.

I've also tried to determine whether the user was in the Console at the time they clicked the button or whether they were on the Leads tab, by checking whether window.parent.location.href == "https://(server).salesforce.com/ui/desktop/DesktopPage", but this isn't working either.

I am using dojo, and opener.location.reload is returning them to the right place, but not refreshing the page (as I mentioned.)

Here are the two relevant bits of code; the first, an attempt to identify whether it's the console or not:
Code:
          if (window.parent.location.href=="https://na3.salesforce.com/ui/desktop/DesktopPage") {
                alert("Opened from console ...");
                finishedLocation = '/{!Lead.Id}—isdtp=mn';
          } else {
                alert("Opened from leads tab ...");
                finishedLocation = '/{!Lead.Id}';
          }
  // followed by
          window.location = finishedLocation

and the second, to refresh the lead detail, irrespective of the location:
Code:
/* I am not using both this code AND 
   window.location = finishedLocation; since finishedLocation wasn't
   doing its job, I've just been using this:

*/ // do the processing that needs to be done, then setTimeout("updateComplete()", 750); } function updateComplete() { opener.location.reload; //opener.focus(); // window.parent.location.reload; // parent.parent.frames.location.replace("/{!Lead.Id}"); }

Right now, setTimeout() is only serving the purpose of displaying a page with the message "Logging voicemail ..." or something
to that effect, leaving enough time for the message to be read and then returning to the lead detail.

Thanks for your help! :)
 

Hello,

 

Reset Security token option is not availble under My Personal Information setup.Please help me out from this problem....