• helpo12
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi,
I was wondering if I could increase the "Help Text" character limit on a field on a custom field on the Lead. I know I can do it if I was to create a visualforce page, but I'd like to avoid create an entire visualforce page for the lead for this one thing. Is there a way, I can do it so I can have a custom help text for a field. If so, how can I do that?
Hi All,

I'm attmepting to create a trigger on a custom object, which is a child of the opportunity. The triggers intention, is to check the oppotunity's Opportunity Line Items, and see if the product exists then create a custom object that is a child of the custom object the trigger is being initiated at.

I get the follwoing error, Error:Apex trigger ReturnSends caused an unexpected exception, contact your administrator: ReturnSends: execution of AfterUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ReturnSends: maximum trigger depth exceeded... I'm trying to figure out how to avoid this error, I know why I'm getting just can't figure out how to correct so it doesn't happen again.

I've put my code below for any help. Thanks

trigger ReturnSends on Change_Request__c (after insert, after update) {

List<Change_Request_Product__c> CRUpdates = new List<Change_Request_Product__c>();
Map<ID, Change_Request__c> oppList = new Map<ID, Change_Request__c>();
List<ID> CRList = new List<ID>();
Map<ID, Change_Request__c> coppList = new Map<ID, Change_Request__c>();

for (Change_Request__c cr : Trigger.new){
    if (cr.CR_State__c == 'Created'){
        if (cr.OAP_Send_POE__c != null){
            //oppList.put(cr.id,cr);
            coppList.put(cr.id,cr);
            //CRList.add(cr.Opportunity_Name__c);
        }
    }
}

if (!coppList.isEmpty()){
for (Change_Request__c cru : [select Id, P_Send__c, P_Send__c, Opportunity_Name__c from Change_Request__c where id in :coppList.keyset()]){
    Change_Request__c OppObj = coppList.get(cru.Id);
    if(OppObj != null){
    for ( OpportunityLineItem oli : [select Id, Product2.Id, Product2.Name, Quantity, UnitPrice, OpportunityID, Opportunity.CurrencyIsoCode from OpportunityLineItem where OpportunityId = :cru.Opportunity_Name__c]){
               if (oli.Product2.Name == 'P30' && cru.P_Send__c != null){
               Change_Request_Product__c crp = new Change_Request_Product__c(Change_Request__c=cru.id,Product__c=oli.Product2.Id, Quantity__c = cru.P_Send__c, Sales_Price__c = oli.UnitPrice, AP_Price__c=decimal.valueof('540'), CurrencyIsoCode = oli.Opportunity.CurrencyIsoCode);
               CRUpdates.add(crp);
               }
    
}
}
}
if (!CRUpdates.isEmpty()){
insert CRUpdates;
}
}
}
Hi,

I have created a hyperlink text field on an Opportunity, and have it displaying on the related lists on the account. Though I was wondering, is there a way, that when someone clicks on the hyperlink, that it opens the opportunity with the field at the top of the page. The oppotunity is quite large, and would like to take the user right to the field without having them scroll through the Opp. Can this be done and how? 

Any help would be appreciated.
Hi,
I was wondering if I could increase the "Help Text" character limit on a field on a custom field on the Lead. I know I can do it if I was to create a visualforce page, but I'd like to avoid create an entire visualforce page for the lead for this one thing. Is there a way, I can do it so I can have a custom help text for a field. If so, how can I do that?