• Peter Bittinger
  • NEWBIE
  • 10 Points
  • Member since 2015
  • SVP Operations and Analytics
  • TGaS Advisors


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
This trigger errors on the 'delete listofschedules' line.  The error is: 
SELF_REFERENCE_FROM_TRIGGER, Object (id = 00p650000038BBW) is currently in trigger OppLineItemDelSchedule, therefore it cannot recursively update itself: []: 

I think the issue is that updating the schedule records then updates the line item record which is already in the trigger.  Is there any way around this?

here is the code:
trigger OppLineItemDelSchedule on OpportunityLineItem (before update) {
Set<ID> oppItemIdsDel = new Set<ID>();
for (OpportunityLineItem itr : Trigger.New) {  
     if (itr.Delete_Schedule__c = TRUE) {                  
         if (itr.hasrevenueschedule) { oppItemIdsDel .add(itr.id); } 
         itr.Delete_Schedule__c = FALSE;                                                                                       
     }
}
     if (oppItemIdsDel.size() > 0) {
                list<opportunitylineitemschedule>  listofschedules = [select id from opportunitylineitemschedule where OpportunityLineItemId in :oppItemIdsDel  ];
        delete listofschedules;
     }
}

 
I am trying to complete the 'Create an Approval Process' trail.  It is asking me to create two users in my developer org - one for the approver, and one for the aprovee.  You only get 2 licenses in the developer org - one for the system admin and one to mess around with a user.  So how do I do this module with only 1 user license to use, but needing 2?
I have the following workflow critera and it's didn't trigger.

AND( 
Deadline_Bank_Balance__c = DATE(2015,12,31) , 
ISBLANK( Year_End_Bank_Balance__c ), 
TODAY() = (Deadline_Remind_Client_Bank_Bal__c + 7) 
)

Deadline_Bank_Balance__c = 12/31/2015
Year_End_Bank_Balance__c is blank
Deadline_Remind_Client_Bank_Bal__c = 12/16/2015

So, on 12/23/2015 it should have triggered and processed the time dependent workflow.  Please help.

On the Account object I have created a formula field called Domain_Name__c . The formula I have used is this,

 

SUBSTITUTE(Website, LEFT(Website, FIND("www.", Website)), NULL)

 

Where website is a standard field on Account.

 

If Website is www.xyzdomain.com or https://www.xyzdomain.com

 

In Domain_Name__c I expected result as xyzdomain.com

 

Instead i am getting the result either as

.xyzdomain.com or ww.xyzdomain.com depending on whether the Email entered was 'www.xyzdomain.com' or 'https://www.xyzdomain.com'


Any thoughts how I can only get the text after the .   

 

e.g If, in the field Website  I enter www.salesforce.com  or  https://www.salesforce.com the result in the Domain_Name__c should be salesforce.com