• Uvais Komath
  • NEWBIE
  • 325 Points
  • Member since 2015
  • Salesforce Developer


  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 3
    Likes Given
  • 5
    Questions
  • 59
    Replies

I just started my Mulesfoft training but i cannot get the studio working!

Everytime it shows error occured just after workspace selection
Here is the error log:

 

!SESSION 2018-10-08 11:45:44.950 -----------------------------------------------
eclipse.buildId=unknown
java.version=11
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/uvaiskomath/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/uvaiskomath/.eclipse_keyring

!ENTRY org.eclipse.osgi 4 0 2018-10-08 11:46:08.122
!MESSAGE Application error
!STACK 1
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:410)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:491)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:505)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
	... 22 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 24 more

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-10-08 11:46:08.162
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NoClassDefFoundError: javax/annotation/PreDestroy
	at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:450)
	at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:156)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:178)
	at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:99)
	at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:141)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168)
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
	at org.eclipse.osgi.container.Module.doStop(Module.java:634)
	at org.eclipse.osgi.container.Module.stop(Module.java:498)
	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 21 more

Any idea on this? I am running on macOs HighSeirra , JDK 8 installed
Hi all,

I have a standard date field in VF page. When i redirect to this URL i want to pass the date through the URL and set date as default value. How to do that. Please help

Amita
Hi All,

I have created a VF page for community to add employee details. I have used a custom object (Employee) for which the master object is Account. I have also added the Account field on the VF page. Now i need to set the account value as the account of the logged in user[Community user Account). How can i achieve this?

<h5>Emergency Contact Information</h5>
                                    <div class="form-field-row">
                                        <div class="form-field-label">First Name</div>
                                        <div class="form-field-input"><apex:inputText value="{!Employee__c.Emergency_First_Name__c}" /></div>
                                    </div>
                                    <div class="form-field-row">
                                        <div class="form-field-label">Last Name</div>
                                        <div class="form-field-input"><apex:inputText value="{!Employee__c.Emergency_Last_Name__c}" /></div>
                                    </div>
                                    <div class="form-field-row">
                                        <div class="form-field-label">Last Name</div>
                                        <div class="form-field-input"><apex:inputText value="{!Employee__c.Account__c}" /></div>
                                    </div>
Hi All,
I am trying to do Trailhead module about Heroku Connect module 
The application's server.js file in the root directory contains the server-side Node.js application. If you edit that file, you see the SQL statement used to update the database:UPDATE salesforce.Contact SET Phone = $1, MobilePhone = $1 WHERE ...
I couldn't find any such file containing the UPDATE salesforce.Contact SET Phone = $1, MobilePhone = $1 WHERE ... 
 please help
decimal bu=0;
        decimal se=0;
        decimal tot = 0;
        string tot1;
        total.clear();
       imbalances1=[SELECT sum(BuyFormula__c) BUY,sum(sellFormula__c) SELL, meter_dum__c meter FROM dealsheet__c where End_Date__c>=:datePicker and Start_Date__c<=:datePicker and  meter_dum__c <> null GROUP BY meter_dum__c ];
       for (AggregateResult ar :  imbalances1)  {
           if(ar.get('buy')==null){bu=0;}
           else{bu=(decimal)ar.get('BUY');}
            if(ar.get('SELL')==null){se=0;}
           else{se= (decimal) ar.get('SELL');}
           tot=bu-se;
            system.debug(bu);
           system.debug(se);
          system.debug(tot);
         //    tot1=(string)tot;
           
          total.add(tot);
           // system.debug('total:'+total.get(0));
       }
       }

I am unable to write Test Code for this code ....any one can help me

thanking u... 
Hi,
I'm in a terrible dilemma with the trigger. I was wondering why there is no id assigned on the record anymore
trigger trigger_Account on Account(before insert, before update){
  for( Account acc : Trigger.new){
    system.debug('Account id: ' + acc.id);
  }
}
this change affected some of my previous triggers

Hello guys,

I need help on the Google Map Marker to be available in my Visualforce Email Template.
Basically, the code below works fine in a visualforce page and I want to do similar to a Visualforce Email Template.

<script src="https://maps.googleapis.com/maps/api/js?&sensor=false">
  </script>

  <script>
      function showMap(){
      var latlng = new google.maps.LatLng(15.477830, 120.589827);
      var myOptions = {
          zoom: 8,
          center : latlng,
         mapTypeId:google.maps.MapTypeId.ROADMAP
      };
      var myMap = new google.maps.Map(document.getElementById('theMap'),myOptions);
      
      var marker = new google.maps.Marker({position:latlng,map:myMap});
     }
     window.onload = showMap;
  </script>

  <div id="theMap" style="width:300px;height:300px"> </div>

When the code is applied in a Visualforce Email Template, it returns me an entirely blank page. I have it directly coded in the Visualforce Email template (rendering html) and tried using a custom component as well but no luck.

I'm able to place the Map using the link below (Directly in my Visualforce Template) but no Marker of course.
 
<img src="https://maps.googleapis.com/maps/api/staticmap?center={!RelatedTo.job__r.Address__c}&zoom=14&size=300x400&sensor=false" ></img>

can anyone help me on this. Thanks a lot in advance :)

Zach
I am working on the below requirement where I want to investigate 

1. Can we send a daily summary of leads that got assigned to the partner.
2. Can the partner user Opt-In/Opt-Out of lead notification messages.
3. How to send only one email when leads are uploaded in bulk.
public class Displayprods
{

 //This is where we have defined the Wrapper Class. 
    public class OpportunityLineItemwrapper
    {
      // all the line record instance create
        public OpportunityLineItem prd{get; set;}
        public Boolean selected {get; set;}
        public OpportunityLineItemwrapper(OpportunityLineItem a)
        {
            prd = a;
            selected = false;
        }
    }
 // This is the Wrapper Name for the object Opportunity Line Items
    List<OpportunityLineItemwrapper> OppList = new List<OpportunityLineItemwrapper>();
    List<OpportunityLineItem> selectedProducts = new List<OpportunityLineItem>();

 //Defines a Map to store all items selected based on the ID from the  ID from the URl.
    Map<Id,OpportunityLineItem> selectedProductsMap = new Map<Id,OpportunityLineItem>();
   

    public Displayprodsinopprtunity(ApexPages.StandardController controller) {

    }
        
    public List<OpportunityLineItemwrapper> getProducts() {
        ID str = ApexPages.currentPage().getParameters().get('ID');         
        OppList.clear();
        
        for(OpportunityLineItem a : [Select Id,Quantity,
ListPrice,PricebookEntry.Product2Id,TotalPrice
 PricebookEntry.Name From OpportunityLineItem
 where Opportunity.id=:str]){
            
            
            OpportunityLineItemwrapper opplineItem = new OpportunityLineItemwrapper(a);            
            if (selectedProductsMap.get(a.Id) != null)
                opplineItem.selected = true;

            OppList.add(opplineItem);        
        }
        return OppList;
    }
    
    public PageReference getSelected() {
        selectedProducts.clear();
        for(OpportunityLineItemwrapper accwrapper : OppList)
        if(accwrapper.selected == true) {
            selectedProducts.add(accwrapper.prd);
            selectedProductsMap.put(accwrapper.prd.id, accwrapper.prd);
        }
        return null;    
        
    }
    
    public List<OpportunityLineItem> GetSelectedProducts()  {
        if(selectedProducts.size()>0)
   return selectedProducts;
        else
   return null;
    }    

    public void updateQuantity() {
        List<Id> SelectedIds = new List<Id>();
       
        for(OpportunityLineItem litem: selectedProducts) {            
             OpportunityLineItem updateQuantity = new OpportunityLineItem (Id=litem.Id,Quantity=22); 
             Update updateQuantity ;            
        }      
    }
        }
Hi All,

I have a scenario where on object recordtype selection page, I am redirecting to standard edit page  and pre-populating some field values based on some criteria using custom logic(using a bypass visualforce page). Functionaltiy is working fine for desktop.
When i am trying to implement the same scenario in Salesforce1, custom logic is not working.
Its an urgent client environment issue and quick help will be appriciated.
 
Hi,

I am writing the below after update trigger for sharing an opportunity record whose stage is CLOSED WON to another user in the organization through APEX but I am getting the bellow error. Can any one please help me where and what type of mistake I am doing hear.

Please find the below attached code :

trigger opptrigger on Opportunity (after update)
{
    list<opportunityshare>opps=new list<opportunityshare>();
    user u=[Select ID From user Where Alias='kuser'];
    for(opportunity op:Trigger.new)
    {
        if(op.StageName=='Closed Won')
        {
          opportunityshare p = new opportunityshare();
            p.opportunityID = op.ID;
            p.UserOrGroupId = u.ID;
            p.opportuniryAccessLevel ='read';
            p.RowCause ='manual';
        }
    }
insert opps;
}

Error I am getting :
Field is not writeable: OpportunityShare.OpportunityId


Thanks & Regards,
Aj
 
hello i am writting a trigger to send mail. i am having two objects one is custom and one is contact. on custom object there is lookup relationship with contact. means from custom object we can choose contact. contact will be having email as a mandatory field. when i will choose contact from custom object(Sent feedback) using lookup field then mail will be sent to email address of that contact. can you help me with this?? this is my code. i am not getting mail.

trigger SentFbtrigger on Sent_Feedback__c (after insert) {
    
//Create a master list to hold the emails we'll send

   List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
    for(Sent_Feedback__c s : Trigger.new) {
    if(s.Contact__r.Email != null && s.Contact__r.Name != null) {
       
        //Create a new Email
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    
      //Set list of people who should get the email
      List<String> sendTo = new List<String>();
      sendTo.add(s.Contact__r.Email);
      mail.setToAddresses(sendTo);
        mail.setTargetObjectId(s.Contact__r.Id);
        
         //Set who the email is sent from
       mail.setReplyTo('james12@ror.com');
      mail.setSenderDisplayName('James R');
    
    
      // Set email contents - you can use variables!
      mail.setSubject('Subject Content');
      String body = 'Dear ' + s.Contact__r.FirstName + ', ';
      body += 'Email Body';
      
      mail.setHtmlBody(body);
    
      //Add your email to the master list
      mails.add(mail);
    }
  }
  // Send all emails in the master list
  Messaging.sendEmail(mails);
}
Scenario:

I have a component that has an <aura:renderIf> within an <aura:iteration>. The <aura:iteration> references a component attribute called "selectedItems" to display a list of items, accompanied by a delete button. When the delete button is clicked, the following actions are performed on the Controller:

1. var selectedItem = component.get('v.selectedItems');
2. selectedItems.splice() the event.target.value
3. component.set('v.selectedItems', selectedItems);


Problem:

Uncaught TypeError: a.getAttribute is not a function appears.


Other observations:

Aside from the error message, the delete button functions as expected.


Attempted fixes:

1. I have tried to wrap either the <aura:renderIf> or the <aura:iteration> in a <span> without success as instructed in the stack exchange link below.

http://salesforce.stackexchange.com/questions/71604/lightning-bug-in-lightning-framework-when-using-aurarenderif

2. When the code updating the component attribute is removed, there's no error, but the delete button does not function as desired.

3. Changing splice() to pop() still shows the error, but only if the delete button of the last item is clicked. The delete button does not function as desired.

4. The <aura:iteration> in the component was stripped down to just the delete button with an onclick controller event and a value attribute of an ID, while the controller was also stripped down to the component.get('v.selectedItems'), selectedItems.splice() based on event.target.value, then component.set(). Still shows the error even though the item is deleted.

Component
<aura:attribute name="selectedItems" type="sObject[]" /> 
....
<aura:iteration items="{!v.selectedItems}" var="obj">
    <tr>
        <td>
            <button type="button" class="btn btn-default" onclick="{!c.removeItem}" value="{!obj.x__Lookup_ID__c}">
                Del
            </button>
        </td>
    </tr>
</aura:iteration>

Controller
removeItem : function(component, event, helper) {
        var target = event.target.value;
        var selectedItems = component.get('v.selectedItems');
        
        for (var i = 0; i < selectedItems.length; i++) {
            if (target == selectedItems[i].x__Lookup_ID__c) {
				selectedItems.splice(i, 1);
            }
        }
        
        component.set('v.selectedItems', selectedItems);
    }


Question:

How do I make the problem go away?
Hi,

I have an visual force email tempalte however the currency field is giving me some problems: 

  <p> 
                We are writing to advise you that an amount of £{!relatedTo.Amount__c} is outstanding on your account
 </p>

This works ok however if the amount is £200.00 when the email is sent it displays as £200.0

The same thing happens if this is £200.50 it will show as £200.5

It works correctly when the amount is e.g £200.11

Can anybody help? 

Thanks