• GeigerJT
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I have an apex class that I am moving from the sandbox to production, and when I make the move I am having problems with the ampersand.

 

The method I use is meant to replace the character "&" with "&". In the sandbox everything tests out well and is ready for production, but when I deploy it to production my method is changed from what I have below to what appears after.

 

 

SANDBOX

 

   public string ampConverter(string ampValue){
          String ampReplace = ampValue.replace('&','&');
          return ampReplace;

 

PRODUCTION

 

    public string ampConverter(string ampValue){
          String ampReplace = ampValue.replace('&','&');
          return ampReplace;

 

 

Any ideas as to why this is happening?

Hi.


I have been working through this article which shows how to set up a Salesforce2Salesforce connection:

http://wiki.developerforce.com/index.php/An_Introduction_to_Salesforce_to_Salesforce

I have managed to set up the connection between the two installations but the code for the automation doesn't seem to work. 

What I want to be able to do is create an apex trigger on a custom object (myObject_c) which when created automatically puts the myObject_c and parent Account object across to the partner. My code looks like:

trigger shareWithPartner on myObject_c(after insert) {
PartnerNetworkRecordConnection newConnection =
                    new PartnerNetworkRecordConnection(
                        ConnectionId = networkId,
                        LocalRecordId = newContact.Id,
                        SendClosedTasks = false,
                        SendOpenTasks = false,
                        SendEmails = false,
                        ParentRecordId = myObject_c.AccountId);
insert newConnection;
}

but I get the error that networkId variable doesn't exist. Do I need to put in the connection id for the partner relationship in here? If I use the Id that is present in the url when I look at the connection:

https://na7.salesforce.com/p/pnetwork/Response/d?id=xyz123456789

in the code then I get the following errors:

                        ConnectionId = xyz123456789,
returns: Compile Error: expecting a right parentheses, found 'xyz123456789'

 

I have an apex class that I am moving from the sandbox to production, and when I make the move I am having problems with the ampersand.

 

The method I use is meant to replace the character "&" with "&". In the sandbox everything tests out well and is ready for production, but when I deploy it to production my method is changed from what I have below to what appears after.

 

 

SANDBOX

 

   public string ampConverter(string ampValue){
          String ampReplace = ampValue.replace('&','&');
          return ampReplace;

 

PRODUCTION

 

    public string ampConverter(string ampValue){
          String ampReplace = ampValue.replace('&','&');
          return ampReplace;

 

 

Any ideas as to why this is happening?

Hi,

Am unable to refresh any of the resources in the IDE from the server.

When am trying to refresh a page from the web, getting an Exception saying:

 

 

Unable to refresh resource 'MileaeExension.cls':
com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Unable to refresh resource 'MileaeExension.cls':


com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Please assist to rectify the issue. 

 

Thanks in advance,

VNath