• Arnt mongoDB
  • NEWBIE
  • 15 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 13
    Replies
Getting this error while deploying approval processes from one sandbox to other :
Error: ApprovalProcess cannot be a component in a managed or unmanaged package. Remove ApprovalProcess from package.xml to deploy unpackaged components.
package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>04-22-Approvals</fullName>
    <description>Approval Processes - ALL (5 components)</description>
    <types>
        <members>CustomObjectName__c.ApprovalProcess1</members>
        <members>CustomObjectName__c.ApprovalProcess2</members>
        <members>CustomObjectName__c.ApprovalProcess3</members>
        <members>CustomObjectName__c.ApprovalProcess4</members>
        <members>CustomObjectName__c.ApprovalProcess5</members>
        <name>ApprovalProcess</name>
    </types>
    <types>
        <members>ReadOnly</members>
        <name>Profile</name>
    </types>
    <version>35.0</version>
</Package>
 
Since Winter 15 was developed (this monday) in sandbox we have the following error in SF internal code, but not our code. We will explain you an example.

We have a controller class with pricebookentryid in an opportunitylineitem update. We triggered the update in opportunitylineitem with a value in pricebookentryid.
Then, opportunitylineitem before update trigger started without pricebookentryid (=null).

We have found out that when the code executes a line with an update on an opportunity line item in a controller class, right before the OpportunityLineItem Before Update trigger gets executed, the pricebookEntry value gets lost (it becomes null). That doesn't happen with other OpportunityLineItem fields nor any other objects.

We have not got this problem before and now in production there is not any problem about it. We haven't change the code. There is the same code in sandbox an production. The code was deployed to production and it works. This only happens in sandbox.
Hi,

I am getting null pointer exception while retrieving PricebookEntry value from OpportunityLineItem and code details are below:

I am getting error for the venet if(Trigger.isBefore && Trigger.isUpdate)  and it was working fine eralier sudeenly satrted throwing error today:

Trigger:
trigger OpportunityLineItemTriggers on OpportunityLineItem (after insert, 
			after update, after delete ,before insert, before update ) {

	OLIClass OLineItemClass  = new OLIClass();

	if(Trigger.isBefore && Trigger.isInsert) {    
		OLIClass.updateOppLineItem_Field(Trigger.New);       
	}

	if(Trigger.isBefore && Trigger.isUpdate) {    
		OLIClass.updateOppLineItem_Field(Trigger.New);  
	}
}

Apex Class:
public without sharing class OLIClass {
	// Function to copy Offer Field Value from Product to OpportunityLineItem  P
	public void updateOppLineItem_Field(List<OpportunityLineItem> newList) {
		Set<Id> PBEIds = new Set<Id>();

		for(OpportunityLineItem oli: newList) {        
			PBEIds.add(oli.PricebookEntryId);
		}

		Map<ID,PricebookEntry> pbeMap = new Map<ID,PriceBookEntry>([Select p.Product2.Offer__c, p.Product2Id, p.Id From PricebookEntry p where ID IN : PBEIds]);
		for(OpportunityLineItem oli: newList) {
			oli.Offer__c  = map_PBE.get(oli.PricebookEntryId).Product2.Offer__c;
		}
	}
}

Can any one please help me to overcome this error.

Regards,
Rajesh Meti
A new problem has suddenly appeared this week in our sandboxes. When I update an OpportunityLineItem, my "before update" trigger sees a null value in the PricebookEntryId field. But this is an update to an existing OpportunityLineItem, so it should have an associated PricebookEntry. When I extract the record in the data loader, it does in fact have a PricebookEntryId. This worked flawlessly last week. Our sandboxes run on CS17, and I can see that Winter 15 is released this weekend, so I guess it is related to that release. It seems like a bug in the platform. Does anybody know of a workaround? We are in the finishing phase of a large project, and our UAT testing is heavily impacted by this, since users are no longer able to make any updates to existing OpportunityLineItems.

Hi,

 

We have just deployed some Https Webservice that are certified with SSL through reverse proxy that supports SNI (http://en.wikipedia.org/wiki/Server_Name_Indication).

 

With the simple Outbound Message it works fine, but with WebserviceCallout or with HttpRequest we got the following error :

-IO Exception: java.security.cert.CertificateException: No subject alternative DNS name matching "Server Name" found.

 

 

Do the both mecanisms (OutboundMessage and HttpRequest) have different libraries underneath ?

 

Thank you,

 

 

  • March 18, 2013
  • Like
  • 0

Ok, I give up.

 

I am updating 359 records. I call an @future method in my trigger. Since it is after insert and after update, I added a static variable which set before calling the @future method.

 

Now when workflows fire for the first 200 records, the after update (second one) does not call the @future.

 

HOWEVER, when the next batch of 159 records gets updated it seems the transaction is not reset as the static variable is still = true and thus the second set of records does not call the @future method.

 

Are the transactions no longer reset?

 

For what its worth, I am simply querying for 359 records and then issuing an update call from the developer console.

 

Anyone have any ideas?

All,

I've noticed that when setting Dataloader's batch size option to 200, triggers are operating in batches of 100. This is not a problem in itself, but I've also noticed that static variables are not cleared between the 100 batch runs. I've included a short example below, but basically all I'd like to know is:

Why are the Dataloader batches broken up, and when does this happen?
Should the static variables be cleared automatically?

As I say, here's a quick example; it's a trigger on Contact and a class with a static variable:

Code:
public class quickClass {
    public static boolean lock = false;
}
 

trigger quick on Contact (before insert) { 
    System.debug('lock: ' + quickClass.lock);
    quickClass.lock = true;
    System.debug('Trigger.new.size(): ' + Trigger.new.size());
 
}

When we insert, say, 150 Contacts, using Dataloader with a batch size of 200 in the log file we will see:

Code:
lock: false
Trigger.new.size(): 100
lock: true
Trigger.new.size(): 50

It doesn't look like it's Dataloader fault - it does look like it's sending 150 Contacts, rather than 100 and then 50.

Like I say, I don't mind the process being broken up, but obviously I'd also like the static variables to be cleared between the processing of the first 100 records finishing, and the processing of the next 50 records starting, as we are using static variables to control execution flow. If these variables are keeping their value, it causes a problem for us!

Hope that's enough detail, thanks in advance for any help...
Gary


  • December 05, 2008
  • Like
  • 1
I've got the following workflow rule on Opportunity and for some reason I'm getting the "Rule not evaluated" in the debug log whenever the triggering criteria is met.

Rule Criteria
(
Opportunity: Opportunity Record Type equals Online Marketing Opportunity RT)
or (Price Book: Price Book Name equals Online)

Evaluation Criteria
When a record is created, or when a record is edited and did not previously meet the rule criteria

I created a brand-new opportunity, setting the record type to "Misc Sales" and then I chose the Online Pricebook, but did not add any products.  When this happened I got the following log entry, and note the prior workflow rule has exactly the same criteria, just "Media" instead.

Code:
Rule Name: Media Opportunity Closed
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
[Opportunity : Opportunity Record Type equals Alternative Media Opportunity RT] OR
 [Price Book : Price Book Name equals Media]
Value found: 01260000000DKSA
Value found: Online
Criteria evaluates to false
[Opportunity: TEST Online Opp 0066000000AX04d]
Rule Name: New Online Opportunity
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
Rule not evaluated

So then I switched the Pricebook to "Media" thinking I'd see if there was a problem with the Online rule, and I got this log entry:
Code:
Rule Name: Media Opportunity Closed
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
Rule not evaluated
[Opportunity: TEST Online Opp 0066000000AX04d]
Rule Name: New Online Opportunity
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
[Opportunity : Opportunity Record Type equals Online Marketing Opportunity RT] OR
 [Price Book : Price Book Name equals Online]
Value found: 01260000000DKSA
Value found: Media
Criteria evaluates to false

Basically if my "Pricebook Name" criteria is met, the rule isn't evaluated.  This causes a big problem because I need to notify people when these types of opportunities are created.  Why in the world isn't the rule being evaluated?  It seems like Salesforce is just being fickle.  :)

Mark