• Deepanshu Kochar
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
I am trying to use Data Loader CLI , but in the very first step i.e Creating the Encryption key , i am getting an error :

C:\Program Files (x86)\salesforce.com\Data Loader\bin>encrypt.bat
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/salesfor
e/dataloader/security/EncryptionUtil : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:1
2)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482

I checked and updated my java version , still getting the same error ,
How do i block access to a particular field for multiple users having different profiles?
I just started with Visualforce and tried to create a page using standard controller(account) using the code below , however the output shows only one of the field in the preview , i.e Account.name .

<apex:page sidebar="false" standardController="Account" >
    

    
    <apex:pageBlock title="Account Summary">
        <apex:pageBlockSection>
            
            Name : {! Account.name}<br>
            Phone : {! Account.Phone}<br>
            Industry : {!Account.Industry}<br>
            Revenue : {!Account.AnnualRevenue}
        </apex:pageBlockSection>
    
    
    </apex:pageBlock>


</apex:page>

Output :

User-added image

I should be getting all the fields. , what am i doing wrong ?
Hi All , i created trigger on Opportunity to add a follow up task whenever a new opportunity is created with "StageName = Closed Won". --->

trigger ClosedOpportunityTrigger on Opportunity (after insert , after update) {

list<task> listtask = new list<task>();
for (opportunity opp : trigger.new){

if (opp.StageName == 'Closed Won'){
task NewTask = new task();
task.subject = 'Follow Up Test Task';
task.ActivityDate = system.today().addmonths(1);
task.whatid = opp.Id;
listtask.add(NewTask);
}


}
if (listtask.size()>0)
insert listtask;


}


How ever while saving the trigger i get an error : Error: Compile Error: Expression cannot be assigned at line -1 column -1

Can not seem to move past this , please help also point out if you see any rookie mistakes in the trigger code.

Thanks
I am trying to use Data Loader CLI , but in the very first step i.e Creating the Encryption key , i am getting an error :

C:\Program Files (x86)\salesforce.com\Data Loader\bin>encrypt.bat
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/salesfor
e/dataloader/security/EncryptionUtil : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:1
2)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482

I checked and updated my java version , still getting the same error ,
I just started with Visualforce and tried to create a page using standard controller(account) using the code below , however the output shows only one of the field in the preview , i.e Account.name .

<apex:page sidebar="false" standardController="Account" >
    

    
    <apex:pageBlock title="Account Summary">
        <apex:pageBlockSection>
            
            Name : {! Account.name}<br>
            Phone : {! Account.Phone}<br>
            Industry : {!Account.Industry}<br>
            Revenue : {!Account.AnnualRevenue}
        </apex:pageBlockSection>
    
    
    </apex:pageBlock>


</apex:page>

Output :

User-added image

I should be getting all the fields. , what am i doing wrong ?
Hi All , i created trigger on Opportunity to add a follow up task whenever a new opportunity is created with "StageName = Closed Won". --->

trigger ClosedOpportunityTrigger on Opportunity (after insert , after update) {

list<task> listtask = new list<task>();
for (opportunity opp : trigger.new){

if (opp.StageName == 'Closed Won'){
task NewTask = new task();
task.subject = 'Follow Up Test Task';
task.ActivityDate = system.today().addmonths(1);
task.whatid = opp.Id;
listtask.add(NewTask);
}


}
if (listtask.size()>0)
insert listtask;


}


How ever while saving the trigger i get an error : Error: Compile Error: Expression cannot be assigned at line -1 column -1

Can not seem to move past this , please help also point out if you see any rookie mistakes in the trigger code.

Thanks