• Khaled Youssef
  • NEWBIE
  • -1 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies
Hello,
i have used the code below to send email after installation of by package , but i received an email from the email of client , how can i receive email from the server smtp ? 
global class MyInstallationHandler implements InstallHandler {
    global void onInstall(InstallContext argContext) {
        Messaging.SingleEmailMessage lEmail = new Messaging.SingleEmailMessage();
        lEmail.setSubject('Someone Installed my Package!! yay!');
        lEmail.setHtmlBody('Congrats, you have a new Client!');
        lEmail.setSaveAsActivity(false);
        lEmail.setToAddresses(new List<String> {'test@test.com'});
        Messaging.sendEmail(new List<Messaging.Email> {lEmail}, false);
    }
}


thanks
how i procced to create a apex class or trigger class to  send automaticly an email alerts to notify me that my  package is downloaded ?
Hi All,
I have developed a custom component and I'm facing an issue related to CSP. When I open the component from the quick action for the first time it works well, but when I close the window that contains the component and I open it again (from the quick action), I'm facing in the console the following error and the component will never load. 

Refused to execute JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension: https://sfdc.azureedge.net *.na35.visual.force.com https://ssl.gstatic.com/accessibility/". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.

Screenshot from Chrome browser.

User-added image


Note: if I deactive Lightning LockerService Security I'm not facing that problem, but the component never load.

Is this an issue or is going to be the default behaviour from now?

has anyone had this problem?

Thanks in advance


 
Hi all,

I am trying to setup my build.xml to reference the ant-salesforce.jar from my project checkout. The directory structure is similar to this:
Project Dir
>src
>ant-salesforce.jar
>build.xml

I am trying to reference the ant-salesforce.jar from the root directory of the project in my build.xml as shown below:
<project name="Test" default="test" basedir=".">

	<property environment="env"/>

	<taskdef resource="com/salesforce/antlib.xml">
      <classpath>
          <pathelement location="./ant-salesforce.jar" />
      </classpath>
  </taskdef>

	<target name="retrieve">
		<sf:retrieve username="${SRC_USERNAME}" password="${SRC_PASSWD}" serverurl="${SRC_URL}" retrieveTarget="src" unpackaged="src/package.xml"/>
	</target>

	<target name="deployValidate">
		<sf:deploy username="${DEST_USERNAME}" password="${DEST_PASSWD}" serverurl="${DEST_URL}" deployRoot="src" rollbackOnError="true" checkonly="true"/>
	</target>

	<target name="deploy">
		<sf:deploy username="${DEST_USERNAME}" password="${DEST_PASSWD}"    serverurl="${DEST_URL}" deployRoot="src" rollbackOnError="true" />
	</target>
</project>

However, it keeps giving me the following error:
build.xml:12: The prefix "sf" for element "sf:retrieve" is not bound.

Am I missing something when including the reference to the ant-salesforce.jar?

Any help would be appreciated.

Thanks
Hello, I got a question for retriving data. For example, if I use code like this: <apex:outputtext value="{!Case.Owner.Name}" /> and I can get a text show on my web page. But how can I know where does each value after dot come from, is that simply (object name) . (field name) . (data wanna retrive). But how can I know the exact name of data that I wanna retrive?  The example I showed is a bad example, cuz I assume that the name of data I wanna retrive maybe call Name, yet I dont know where to find it.     Thanks for helping.
how i procced to create a apex class or trigger class to  send automaticly an email alerts to notify me that my  package is downloaded ?

I am new to Visual Force and I have what I feel like shouldn't be that difficult of a task.  On the Event object I am trying to create a button that when a user clicks it will create a record on a custom object.  Anyone have any suggestions as to how to get this process off the ground? 

How do you craft a URL to default field values on a new record that I want to create from a sidebar link?
 
For example, if I create a new child record from a parent object, the url I'm directed to is something like this:
na3.salesforce.com/a0O/e?CF00N50000001xQY6=Salesforce+Administration
 
Where CF00N50000001xQY6 seems to be some internal value for the parent record association and when the URL renders the parent record value is populated in the new edit record form.
 
So, how do I find out the id values for other fields I want to pass to this URL? For example, here is what I'm trying to do, but it does not work:
 
na3.salesforce.com/a0O/e?CF00N50000001xQY6=Salesforce+Administration&type__c=Question
 
Any ideas?
 
Also, how would I do this URL so that another page layout is displayed instead of the default page layout for a profile? How would I craft the URL to dictate which page layout is displayed and how do I find the ID for that page layout?
 
Thanks