• Laurent Lemazurier
  • NEWBIE
  • 10 Points
  • Member since 2010
  • Administrator And Project Manager
  • Eiffage


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 4
    Questions
  • 6
    Replies
Hy all,

Since I changed a text field to a text area field, I can no longer use the value of the field in a javascript code of a lightning component.
The code simply assigns the value of my field ( called MyTextField in the code bellow) to another one:
myOpportunity.anotherfield__c = myCustomObject.MyTextField__c;

Notice the other field is also a text area and this worked well before we changed the type of myTextField to a text area field.

Thanks for your help

Laurent
 
 
Hy

Before adding a idea for this, please ensure we can't add a manage process in Change Set.
Hy


Using the folowing code proposed in Salesforce Help , I've made a formula to represente Horizontal Bar representing a scoring.

IMAGE("/img/samples/color_green.gif", "green", 15, Industry_Score__c * 2) & IMAGE("/s.gif", "white", 15, 200 - (Industry_Score__c * 2))


It works well in Salesforce Classic but not in Salesforce1: the dynamic dimension is applied to both height and width of each gif, so I've got squares instead of bars.

How can I make it available in all environments (Salesforce Classic, Lightning, Salesforce1) ?


Thank's for your help
 

HI,

 

I'm trying to create a button from account page, to let the user create an opportunity linked to this account.

 

Here is the code I wrote to do that. 

Notice, I'm a beginner and I've just copy an existing code wich working well.

The code works but an error occurs while exeuting test methods:

 System.NullPointerException: Attempt to de-reference a null object.

on this line 

PageReference p = new PageReference(Constants.RECORD_TYPE_URL);

public with sharing class New_Opportunity_On_Account
{

  private string AccountId;
     
  
  public New_Opportunity_On_Account()
  {
      AccountId = ApexPages.currentPage().getParameters().get('id');
  }

  public Pagereference init()
  {        
    PageReference p = new PageReference(Constants.RECORD_TYPE_URL);
    p.getParameters().put('ent','Opportunity');
    p.getParameters().put(constants.RET_URL,'/'+AccountId); 
    string save_Url = Constants.OPPORTUNITY_EDIT_URL + '?nooverride=1&';
    
    save_Url +=  constants.ACCOUNT_ID_FIELD_ID + '=' + AccountId  + '&' +
        constants.CLOSED_DATE_FIELD_ID +'=' +constants.CLOSED_DATE + '&' +  
        constants.RET_URL + '=' + '/'+AccountId;
    
    p.getParameters().put(Constants.SAVE_NEW_URL,save_Url);
    
    return p;
  }
  
  /************************************TEST************************************/
  public static testMethod void test()
  {
    Account acc = New Account();
    acc.Name='Test';
    insert acc;
 
    PageReference p  = Page.New_Opportunity_On_Account;
    p.getParameters().put('id',acc.id);
    Test.setCurrentPageReference(p);
    New_Opportunity_On_Account vf = new New_Opportunity_On_Account();
    vf.init();
  }

}

 

 

It seems to be due to the record type selection step.

I tried this and have no more error:

 

 public Pagereference init()
  {        
    string save_url ='/006/e?nooverride=1&opp4_lkid=001R000000iv3fc +'&' +
                    constants.CLOSED_DATE_FIELD_ID +'='
                        +constants.CLOSED_DATE +'&'+constants.RET_URL +'=/'+AccountId;  
    PageReference p = new PageReference(save_url);
return p;

 

 

But I don't know why ... and why the original code doesn't generate any error message.

Is there somebody who can help me understand?

 

(Please use easy english without any expression :) )

 

 

Hy all,

Since I changed a text field to a text area field, I can no longer use the value of the field in a javascript code of a lightning component.
The code simply assigns the value of my field ( called MyTextField in the code bellow) to another one:
myOpportunity.anotherfield__c = myCustomObject.MyTextField__c;

Notice the other field is also a text area and this worked well before we changed the type of myTextField to a text area field.

Thanks for your help

Laurent
 
 
Hy

Before adding a idea for this, please ensure we can't add a manage process in Change Set.

I know that it is possible to create a FeedItem using Flow (as I have done so!), but is it possible to create an @mention in the body of that FeedItem?

 

I have tried doing @[{!varManagerName}], as well as using just the Id and another number of combinations, but it doesn't seem to want to work :)

 

 

If someone can help me figure it out, I would be ecstatic. This would be an absolutely perfect solution to a process issue we are currently experiencing!

I'm getting the attached error when attempting to install the latest Force.com IDE plugin on the latest Eclipse version with the latest JDK installed.  The error comes up after I click next on the "Available Software" selection screen of the "Install New Software" dialog.  How can I fix this problem?  Thank you!

 

 

Cannot complete the install because of a conflicting dependency.
  Software being installed: Force.com IDE 20.0.1.201011121559 (com.salesforce.ide.feature.feature.group 20.0.1.201011121559)
  Software currently installed: Shared profile 1.0.0.1284708747720 (SharedProfile_epp.package.java 1.0.0.1284708747720)
  Only one of the following can be installed at once: 
    Structured Source Editor 1.2.2.v201008232126 (org.eclipse.wst.sse.ui 1.2.2.v201008232126)
    Structured Source Editor 1.1.102.v200910200227 (org.eclipse.wst.sse.ui 1.1.102.v200910200227)
  Cannot satisfy dependency:
    From: Shared profile 1.0.0.1284708747720 (SharedProfile_epp.package.java 1.0.0.1284708747720)
    To: org.eclipse.wst.sse.ui [1.2.2.v201008232126]
  Cannot satisfy dependency:
    From: Force.com IDE 20.0.1.201011121559 (com.salesforce.ide.feature.feature.group 20.0.1.201011121559)
    To: org.eclipse.wst.html.ui [1.0.0,2.0.0)
  Cannot satisfy dependency:
    From: HTML UI Source Editor 1.0.401.v200908111935 (org.eclipse.wst.html.ui 1.0.401.v200908111935)
    To: bundle org.eclipse.wst.sse.ui [1.1.0,1.2.0)

 

 

  • February 03, 2011
  • Like
  • 0

I'm trying to use the XmlStreamWriter class to create an Xml document for to be used to generate a REST API call to a third party API. The API expects ISO-8859-1 character encoding. I build my Xml document as follows:

 

 

String camNs = 'http://api.xxxxxx.com/xsd/xxxxx';
String camPrefix = 'cam';
XmlStreamWriter w = new XmlStreamWriter();
w.writeStartDocument('ISO-8859-1', '1.0');
w.writeStartElement(camPrefix, 'campaign', camNs);
w.writeNamespace(camPrefix, camNs);

.
.
.

w.writeEndElement();
w.writeEndDocument();
String xmlOutput = w.getXmlString();
w.close();
return xmlOutput;

 

When I try to execute this code I get the following error: System.XmlException: Underlying stream encoding 'UTF-8' and input paramter for writeStartDocument() method 'ISO-8859-1' do not match.

 

According to the Apex docs, the Apex XmlStreamWriter class is based on the Stax API. The javadocs for the Stax API state the following for the XmlStreamWriter.writeStartDocument(String encoding, String version) method:

 

Note that the encoding parameter does not set the actual encoding of the underlying output. That must be set when the instance of the XMLStreamWriter is created using the XMLOutputFactory.

Unfortunately, the Apex implementation only has a no-argument constructor for the XmlStreamWriter class, so how can I set the encoding for the underlying stream when the XmlStreamWriter instance is created? It seems to me that the Apex implementation is limited to UTF-8 encoding.

 


 

 

 

  • September 20, 2010
  • Like
  • 0
HI,
I have a problem when I try to run the Encrypt.bat file in the data loader using the command prompt. I installed ava 8 Update 202 (64-bit), Java(TM) SE Development Kit 11.0.2 (64-bit). Zulu 11.29 (64-bit) then I installed Data Loader version 45.0.0.
As I want to use command line interface datta loader first i tried to run encrypt.bat. The following problem occurs:
c:\Program Files (x86)\salesforce.com\Data Loader\bin>encrypt.bat -g test
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/salesforce/dataloader/security/EncryptionUtil has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)


I tried different versions of java jdk and jre but the result seems the same. Do you have some suggestions? 
thank you

I know that it is possible to create a FeedItem using Flow (as I have done so!), but is it possible to create an @mention in the body of that FeedItem?

 

I have tried doing @[{!varManagerName}], as well as using just the Id and another number of combinations, but it doesn't seem to want to work :)

 

 

If someone can help me figure it out, I would be ecstatic. This would be an absolutely perfect solution to a process issue we are currently experiencing!

Could I get simple example of how to loop through a multi-select picklist field?

 

Thanks!