• mbond
  • NEWBIE
  • 75 Points
  • Member since 2010

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

Here's my code that's causing the error:

    	for(OpportunityLineItem oppLI : 
    			[SELECT Id
    			FROM OpportunityLineItem 
    			WHERE Opportunity.Account.Id = :AcctId]) {
 ...
   	}

 

Here's my error:

System.UnexpectedException: No such column 'Id' on entity 'OpportunityLineItem'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

So if every entity has an 'Id' column, how can I get an error that the 'Id' column doesn't exist?  I've googled this and didn't find anything helpful.

 

Thanks for helping,

Matt

  • June 24, 2011
  • Like
  • 0

Is there a way to manipulate a Workflow's time dependent action in Apex to push the time out further?

 

Here's my scenario:  320 days after a custom date field in an Account, I need to send an email alert.  That's easy to do with Workflow.  However, if that date changes, I need the existing email alert's send date to also change.  I don't see a way to handle this with existing Workflow and Apex functionality. 

 

Does anyone know of a way?

 

Thanks,

Matt

  • May 11, 2011
  • Like
  • 0

I currently have a button that will call out to an external server and retrieve a value.  That value is then placed in a field for the same record.  Everything works right now.  The problem is that instead of refreshing the current tab/page, it opens a new window and the user needs to press Back to see the current data.  If they close the new window, then they see the old data.  How can I get the button to refresh the current tab/page after updating the value?

 

Thanks,

Matt

  • March 08, 2011
  • Like
  • 0

I've created a wrapper around Apex's Crypto class so I could have consistent handling of the encrypt and decrypt functions and hide most of the input params to those functions.  I'm storing the 3 blobs that encypt and decrypt as base64 encoded strings and then base64 decoding them before use.  Encyption works fine.  I get this error when decrypting:

 

06:25:30.433|USER_DEBUG|[103]|DEBUG|Key size = 16
06:25:30.433|METHOD_EXIT|[103]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[104]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[104]|String.valueOf(Integer)
06:25:30.433|METHOD_ENTRY|[104]|Blob.size()
06:25:30.433|METHOD_EXIT|[104]|Blob.size()
06:25:30.433|METHOD_EXIT|[104]|String.valueOf(Integer)
06:25:30.433|USER_DEBUG|[104]|DEBUG|Vector size = 16
06:25:30.433|METHOD_EXIT|[104]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[105]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[105]|String.valueOf(Integer)
06:25:30.433|METHOD_ENTRY|[105]|Blob.size()
06:25:30.433|METHOD_EXIT|[105]|Blob.size()
06:25:30.433|METHOD_EXIT|[105]|String.valueOf(Integer)
06:25:30.433|USER_DEBUG|[105]|DEBUG|Auth size = 48
06:25:30.433|METHOD_EXIT|[105]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[1]|Crypto.Crypto()
06:25:30.433|METHOD_EXIT|[1]|Crypto
06:25:30.433|METHOD_ENTRY|[108]|system.Crypto.decrypt(String, Blob, Blob, Blob)
06:25:30.434|METHOD_EXIT|[108]|system.Crypto.decrypt(String, Blob, Blob, Blob)
06:25:30.436|FATAL_ERROR|System.SecurityException: Given final block not properly padded

I'm using the 128 bit AES option.  You can see from the log that my key, vector, and ciphertext (Auth) are multiple of 8.  I don't want to provide the base64 encoded ciphertext here, but it's 64 characters; however, It does not end in "==".  Since I'm using encrypt to create it, what else must be done to get this to work?  I'm only using ASCII characters in my cleartext when encrypting.  Could SF's implementation of the base64 encoding/decoding not handle round trips with certain characters?

 

Thanks in advance,

Matt

  • March 08, 2011
  • Like
  • 0

Here's my code that's causing the error:

    	for(OpportunityLineItem oppLI : 
    			[SELECT Id
    			FROM OpportunityLineItem 
    			WHERE Opportunity.Account.Id = :AcctId]) {
 ...
   	}

 

Here's my error:

System.UnexpectedException: No such column 'Id' on entity 'OpportunityLineItem'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

So if every entity has an 'Id' column, how can I get an error that the 'Id' column doesn't exist?  I've googled this and didn't find anything helpful.

 

Thanks for helping,

Matt

  • June 24, 2011
  • Like
  • 0

I currently have a button that will call out to an external server and retrieve a value.  That value is then placed in a field for the same record.  Everything works right now.  The problem is that instead of refreshing the current tab/page, it opens a new window and the user needs to press Back to see the current data.  If they close the new window, then they see the old data.  How can I get the button to refresh the current tab/page after updating the value?

 

Thanks,

Matt

  • March 08, 2011
  • Like
  • 0

I've created a wrapper around Apex's Crypto class so I could have consistent handling of the encrypt and decrypt functions and hide most of the input params to those functions.  I'm storing the 3 blobs that encypt and decrypt as base64 encoded strings and then base64 decoding them before use.  Encyption works fine.  I get this error when decrypting:

 

06:25:30.433|USER_DEBUG|[103]|DEBUG|Key size = 16
06:25:30.433|METHOD_EXIT|[103]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[104]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[104]|String.valueOf(Integer)
06:25:30.433|METHOD_ENTRY|[104]|Blob.size()
06:25:30.433|METHOD_EXIT|[104]|Blob.size()
06:25:30.433|METHOD_EXIT|[104]|String.valueOf(Integer)
06:25:30.433|USER_DEBUG|[104]|DEBUG|Vector size = 16
06:25:30.433|METHOD_EXIT|[104]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[105]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[105]|String.valueOf(Integer)
06:25:30.433|METHOD_ENTRY|[105]|Blob.size()
06:25:30.433|METHOD_EXIT|[105]|Blob.size()
06:25:30.433|METHOD_EXIT|[105]|String.valueOf(Integer)
06:25:30.433|USER_DEBUG|[105]|DEBUG|Auth size = 48
06:25:30.433|METHOD_EXIT|[105]|System.debug(ANY)
06:25:30.433|METHOD_ENTRY|[1]|Crypto.Crypto()
06:25:30.433|METHOD_EXIT|[1]|Crypto
06:25:30.433|METHOD_ENTRY|[108]|system.Crypto.decrypt(String, Blob, Blob, Blob)
06:25:30.434|METHOD_EXIT|[108]|system.Crypto.decrypt(String, Blob, Blob, Blob)
06:25:30.436|FATAL_ERROR|System.SecurityException: Given final block not properly padded

I'm using the 128 bit AES option.  You can see from the log that my key, vector, and ciphertext (Auth) are multiple of 8.  I don't want to provide the base64 encoded ciphertext here, but it's 64 characters; however, It does not end in "==".  Since I'm using encrypt to create it, what else must be done to get this to work?  I'm only using ASCII characters in my cleartext when encrypting.  Could SF's implementation of the base64 encoding/decoding not handle round trips with certain characters?

 

Thanks in advance,

Matt

  • March 08, 2011
  • Like
  • 0