• Daniel Haselhan
  • NEWBIE
  • 100 Points
  • Member since 2012

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

Hi,

 

I need to display various kinds of below data in a vf page.

 

<link to articles><User friendly name><some texts> 

<some texts><link to articles><User friendly name><some texts>

<some texts><link to articles><User friendly name>

 

I created a text area field and updated data as 

<a href="<link>" target="_parent">Learn more</a> and get excited to enhance your skills!

However, when I try to display this in vf, it is exactly coming as what i have given, not as a url link. 

 

any suggestions?

I'm having an issue with one of my classes and triggers and I am hoping someone may be able to help me.  I am getting this error:

 

Error:Apex trigger CreateActualsAndTargets caused an unexpected exception, contact your administrator: CreateActualsAndTargets: execution of AfterUpdate caused by: System.QueryException: List has no rows for assignment to SObject: Class.GooalAndActuals.getPaymentType: line 69, column 1

 

I understand that when this error happens because there is no records for it to assign.  I did this on purpose to break my trigger and to make sure it was working correctly.  What I don't understand is that I have a return null statement to account for this situation and its not working.

 

public String getPaymentType()
 {
 if(opportunityNew!=null)
     {
     Recon_Detail__c reconDetail = [Select id, Payment_Type__c From Recon_Detail__c Where Contract_Id__c=:opportunityNew.Contract_ID__c limit 1];  //fails at this line
     return reconDetail.Payment_Type__c;}
 else return null;
 }
 
 public void CreateActual(Id OwnderID,ID GoalID)
 {
          
    if((opportunityNew!=null) && (GoalID!= null))
    {
            
            String getPaymentType = getPaymentType();
            
            l_oActual = new Actual__c();
            l_oActual.Opportunity__c=opportunityNew.Id;
            l_oActual.Opportunity_Amount__c=opportunityNew.Amount;
            l_oActual.AccountName__c=opportunityNew.AccountId;
            l_oActual.Goal__c=GoalID;
            l_oActual.Actual_Owner__c=OwnderID;
            l_oActual.Payment_Type__c=getPaymentType();
            insert l_oActual;
    }
 }

 here's my trigger:

 

trigger CreateActualsAndTargets 
on 
Opportunity (after insert, after update) 
{
 if(Trigger.isUpdate || Trigger.isInsert)   
    {
      Map<ID,Opportunity> l_OpportunityOwners = new Map<ID,Opportunity> ([Select id,o.Owner.ManagerId,Contract_ID__c,StageName,Amount,AccountId,CloseDate, o.OwnerId, Type From Opportunity o where id in:trigger.newMap.keySet()]);
      GooalAndActuals l_oGooalAndActuals = new GooalAndActuals ();
        
      for(Opportunity l_oOpportunityNew:l_OpportunityOwners.values())
      {
        System.debug('********************Trigger Start***********************');
        if(l_oOpportunityNew.StageName=='Closed/Won')
        {
          ID SalesRepGoalID,ManagerGoalID;
          //modified
          l_oGooalAndActuals = new GooalAndActuals ();
          l_oGooalAndActuals.opportunityNew=l_oOpportunityNew;
          
          
          //Goal Creation
          SalesRepGoalID=l_oGooalAndActuals.CreateGoal(l_oOpportunityNew.OwnerId);//SalesRep Goal Creation
          if(l_oOpportunityNew.Owner.ManagerId!= null)
          {
            ManagerGoalID=l_oGooalAndActuals.CreateGoal(l_oOpportunityNew.Owner.ManagerId);//Manager Goal Creation
          }
          
          
          //Actual Deletion
          if(Trigger.isUpdate)
          {
            l_oGooalAndActuals.DeleteActual(l_oOpportunityNew.Id);
            
          }
          
          //Actual Creation
          l_oGooalAndActuals.CreateActual(l_oOpportunityNew.OwnerId,SalesRepGoalID);//SalesRep Actual Creation
          if(l_oOpportunityNew.Owner.ManagerId!= null)
          {
            l_oGooalAndActuals.CreateActual(l_oOpportunityNew.Owner.ManagerId,ManagerGoalID);//Manager Actual Creation
          }
          
          
          
        }
              
        else if(Trigger.isUpdate)
        {
            if(Trigger.oldMap.get(l_oOpportunityNew.Id).StageName == 'Closed/Won' && l_oOpportunityNew.StageName != 'Closed/Won')
            {
                l_oGooalAndActuals = new GooalAndActuals ();
                l_oGooalAndActuals.opportunityNew=l_oOpportunityNew;
                l_oGooalAndActuals.DeleteActual(l_oOpportunityNew.Id);
            }
        }      
        
      }
    }
   
}

 

 

 

 

 

 

 

 

 

On the Account and Opportunity objects there are some fields grouped under the Additional Information header on the web form. For Account e.g Customer Priority, SLA Expiration Date etc. and for Opportunity, Order Number, Current Generators etc..

 

These fields seems impossible to access via the REST API, or am I missing something?

Hello Everyone,

 

The title is pretty explanatory,

I am using the HYPERLINK() function on a field with no spaces or breaks and it's still rendering with extra text and no hyperlink.

 

This issue is mentioned here:

http://success.salesforce.com/ideaview?id=08730000000BqBQAA0

But in that case it had to do with the hyperlink containing spaces which mine does not.

Anyone found a way to get this to work?

 

Hello,

 

I am currently setting up a customer portal web app and I am using the Customer Portal Users within salesforce to query for everything. I am trying to query the Product2 but this is denied. Unfortunately Product2 is not a standard object so I can't find it under any of the typical permission settings/sharing settings pages.

 

Is there anyway to grant Read rights for the Product2 table to Customer Portal Users?

Hello,

 

I am writing a customer portal web app using the SOAP API using the LoginScopeHeader and I can't seem to get passed this issue.


I cloned the default Overage Customer Portal User which can successfully log into the Portal through the app, and once I switch my test user over to the new Profile, I get the above error.

 

The Customer Portal User is still checked in the profile and since I cloned the default customer portal profile I should have the same rights.

 

Anyone have any suggestions on this?

 

Sorry if I should have posted this to wrong board, I figured since this was all done through the API and in Java this was the best place. Thanks!

Hello Everyone,

 

The title is pretty explanatory,

I am using the HYPERLINK() function on a field with no spaces or breaks and it's still rendering with extra text and no hyperlink.

 

This issue is mentioned here:

http://success.salesforce.com/ideaview?id=08730000000BqBQAA0

But in that case it had to do with the hyperlink containing spaces which mine does not.

Anyone found a way to get this to work?

 

Hi,

 

I need to display various kinds of below data in a vf page.

 

<link to articles><User friendly name><some texts> 

<some texts><link to articles><User friendly name><some texts>

<some texts><link to articles><User friendly name>

 

I created a text area field and updated data as 

<a href="<link>" target="_parent">Learn more</a> and get excited to enhance your skills!

However, when I try to display this in vf, it is exactly coming as what i have given, not as a url link. 

 

any suggestions?

I'm having an issue with one of my classes and triggers and I am hoping someone may be able to help me.  I am getting this error:

 

Error:Apex trigger CreateActualsAndTargets caused an unexpected exception, contact your administrator: CreateActualsAndTargets: execution of AfterUpdate caused by: System.QueryException: List has no rows for assignment to SObject: Class.GooalAndActuals.getPaymentType: line 69, column 1

 

I understand that when this error happens because there is no records for it to assign.  I did this on purpose to break my trigger and to make sure it was working correctly.  What I don't understand is that I have a return null statement to account for this situation and its not working.

 

public String getPaymentType()
 {
 if(opportunityNew!=null)
     {
     Recon_Detail__c reconDetail = [Select id, Payment_Type__c From Recon_Detail__c Where Contract_Id__c=:opportunityNew.Contract_ID__c limit 1];  //fails at this line
     return reconDetail.Payment_Type__c;}
 else return null;
 }
 
 public void CreateActual(Id OwnderID,ID GoalID)
 {
          
    if((opportunityNew!=null) && (GoalID!= null))
    {
            
            String getPaymentType = getPaymentType();
            
            l_oActual = new Actual__c();
            l_oActual.Opportunity__c=opportunityNew.Id;
            l_oActual.Opportunity_Amount__c=opportunityNew.Amount;
            l_oActual.AccountName__c=opportunityNew.AccountId;
            l_oActual.Goal__c=GoalID;
            l_oActual.Actual_Owner__c=OwnderID;
            l_oActual.Payment_Type__c=getPaymentType();
            insert l_oActual;
    }
 }

 here's my trigger:

 

trigger CreateActualsAndTargets 
on 
Opportunity (after insert, after update) 
{
 if(Trigger.isUpdate || Trigger.isInsert)   
    {
      Map<ID,Opportunity> l_OpportunityOwners = new Map<ID,Opportunity> ([Select id,o.Owner.ManagerId,Contract_ID__c,StageName,Amount,AccountId,CloseDate, o.OwnerId, Type From Opportunity o where id in:trigger.newMap.keySet()]);
      GooalAndActuals l_oGooalAndActuals = new GooalAndActuals ();
        
      for(Opportunity l_oOpportunityNew:l_OpportunityOwners.values())
      {
        System.debug('********************Trigger Start***********************');
        if(l_oOpportunityNew.StageName=='Closed/Won')
        {
          ID SalesRepGoalID,ManagerGoalID;
          //modified
          l_oGooalAndActuals = new GooalAndActuals ();
          l_oGooalAndActuals.opportunityNew=l_oOpportunityNew;
          
          
          //Goal Creation
          SalesRepGoalID=l_oGooalAndActuals.CreateGoal(l_oOpportunityNew.OwnerId);//SalesRep Goal Creation
          if(l_oOpportunityNew.Owner.ManagerId!= null)
          {
            ManagerGoalID=l_oGooalAndActuals.CreateGoal(l_oOpportunityNew.Owner.ManagerId);//Manager Goal Creation
          }
          
          
          //Actual Deletion
          if(Trigger.isUpdate)
          {
            l_oGooalAndActuals.DeleteActual(l_oOpportunityNew.Id);
            
          }
          
          //Actual Creation
          l_oGooalAndActuals.CreateActual(l_oOpportunityNew.OwnerId,SalesRepGoalID);//SalesRep Actual Creation
          if(l_oOpportunityNew.Owner.ManagerId!= null)
          {
            l_oGooalAndActuals.CreateActual(l_oOpportunityNew.Owner.ManagerId,ManagerGoalID);//Manager Actual Creation
          }
          
          
          
        }
              
        else if(Trigger.isUpdate)
        {
            if(Trigger.oldMap.get(l_oOpportunityNew.Id).StageName == 'Closed/Won' && l_oOpportunityNew.StageName != 'Closed/Won')
            {
                l_oGooalAndActuals = new GooalAndActuals ();
                l_oGooalAndActuals.opportunityNew=l_oOpportunityNew;
                l_oGooalAndActuals.DeleteActual(l_oOpportunityNew.Id);
            }
        }      
        
      }
    }
   
}

 

 

 

 

 

 

 

 

 

On the Account and Opportunity objects there are some fields grouped under the Additional Information header on the web form. For Account e.g Customer Priority, SLA Expiration Date etc. and for Opportunity, Order Number, Current Generators etc..

 

These fields seems impossible to access via the REST API, or am I missing something?

Hi Team,

 

I am trying to download the attachment from salesforce using SObject. Its working fine for the files less than 2MB size but failing with java out of memory : heap space error message for the file more than 2MB. We have the limit of 25MB in salesforce.

I have pasted the stack trace below. Your suggestion and guidance in this issue is much appreciated.

 

[Error]

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuilder.append(StringBuilder.java:119)
at com.sforce.ws.bind.XmlObject.loadAfterStartTag(XmlObject.java:284)
at com.sforce.ws.bind.XmlObject.load(XmlObject.java:263)
at com.sforce.ws.bind.XmlObject.loadAfterStartTag(XmlObject.java:281)
at com.sforce.ws.bind.XmlObject.load(XmlObject.java:263)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:528)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:506)
at com.sforce.soap.partner.QueryResult.loadFields(QueryResult.java:1)
at com.sforce.soap.partner.QueryResult.load(QueryResult.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
at com.sforce.soap.partner.QueryMoreResponse_element.loadFields(QueryMoreResponse_element.java:1)
at com.sforce.soap.partner.QueryMoreResponse_element.load(QueryMoreResponse_element.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:173)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:147)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
at com.sforce.soap.partner.PartnerConnection.queryMore(PartnerConnection.java:1)
at com.informatica.cloudlabs.adapter.chatter.utils.ChatterHelper.getAllContentFeeds(ChatterHelper.java:271)
at com.informatica.cloudlabs.adapter.chatter.utils.ChatterHelper.fetchFeedItem(ChatterHelper.java:304)
at com.informatica.cloudlabs.adapter.chatter.read.ChatterRead.read(ChatterRead.java:97)
at com.informatica.cloud.api.adapter.reader.runtime.GenericRdrPartitionDriver.run(GenericRdrPartitionDriver.java:294)

 

[/Error]

I have two date fields on my Event.

 

'Start' (which is standard) and  Lead_Date_Assigned__c

 

I need a rule saying the difference between the 'Start" date and the Lead_Date_Assigned__c cannot be greater then 90 days.

 

Can someone point in the right direction?

I'm using the enterprise WSDL in Java and I need to query all the Opportunities a Conatct has and set the Account ID on each Opportunity found.  I see the Contact object has serveral Opportunity related methods, getOpportunities(), getOpportunity__c(), getOpportunities1__r()...getOpportunities5__r()etc.  What should I use to do this?  getOpportunities() returns a QueryResult but it seems to be always null.  How can I get this data?

 

If I could have gotten this linked/joined data when I queried for the Contact that might be okay too but I'm not sure how to get/query for joined data in SF.

 

This is probably a basic question but could really use some help...quite new to SF.

  • August 08, 2012
  • Like
  • 0

Hi All, I am thinking is it possible to use portal user credentials to authenticate to SF SOAP API? If yes, how?

 

Basically, I have done a bit of research and coding for that, and it seems the answer to this question is no. As to use SOAP API, I need to provide user name and password+security token for the authentication. But the situation for portal users is that there is no such a way to retrieve their security token.

 

Woule be very appreciated if anyone can confirm my answer or point me to a right way if I am wrong.

 

 

 

 

Hello,

 

I am currently setting up a customer portal web app and I am using the Customer Portal Users within salesforce to query for everything. I am trying to query the Product2 but this is denied. Unfortunately Product2 is not a standard object so I can't find it under any of the typical permission settings/sharing settings pages.

 

Is there anyway to grant Read rights for the Product2 table to Customer Portal Users?

Hello,

 

I am writing a customer portal web app using the SOAP API using the LoginScopeHeader and I can't seem to get passed this issue.


I cloned the default Overage Customer Portal User which can successfully log into the Portal through the app, and once I switch my test user over to the new Profile, I get the above error.

 

The Customer Portal User is still checked in the profile and since I cloned the default customer portal profile I should have the same rights.

 

Anyone have any suggestions on this?

 

Sorry if I should have posted this to wrong board, I figured since this was all done through the API and in Java this was the best place. Thanks!