• herodotus
  • NEWBIE
  • 25 Points
  • Member since 2008

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

Has anyone managed to deploy a custom javascript button using ANT.

After looking around a bit I can't find any help on this.


An example with package.xml, and the object xml would be much appreciated, as would any pointers on where to look to figure this out.

 

For example, in package.xml, what name do we use in Package/types/name markup. CustomObject?

If CustomObject is correct, what markup should be in the customobject.object file in the objects directory?

 

Thanks

To keep a record unique with respect to three fields, we setup:

 

  • hidden formula field to capture the three part unique key
  • visible text field with unique specified to hold the key
  • field update to move the formula field to the unique field
  • workflow rule to fire the field update on insert or whenever any of the three parts change.

 

 

This scheme works fine, however when running a test method with a bulk insert, the bulk insert fails.

The interesting thing is the insert call does not fail if records are inserted one at a time in a for loop.

The insert call does fail when the records are collected in a List in the for loop and inserted all at once.

 

I speculate that somehow the uniqueness key is cached and verified as unique more than once.

Perhaps the second time it gets verified agianst its cached-recently-verified value, as the error message indicates that the unique record id associated with the uniqueness violation is non other than the just inserted record. A typical error message looks like:

DUPLICATE_VALUE, duplicate value found: Unique_Commodity_LDC_LDC_Account__c duplicates value on record with id: a06Q00000009W5g 

 

The record id a06Q00000009W5g was generated as a result of the insert.

Any ideas on what might be causing the uniqueness-violation-on-bulk-insert behaviour?

 

Thanks 

When attempting to save an Apex class the following error pops up:
    From Apex Editor in salesforce: Save Error: Insufficient Privaledges
    From eclipse IDE: Save error: insufficient access rights on cross-referenc id
 
Any ideas?
 
The save worked one day, then did not work the next.
 
 
Thanks

Has anyone managed to deploy a custom javascript button using ANT.

After looking around a bit I can't find any help on this.


An example with package.xml, and the object xml would be much appreciated, as would any pointers on where to look to figure this out.

 

For example, in package.xml, what name do we use in Package/types/name markup. CustomObject?

If CustomObject is correct, what markup should be in the customobject.object file in the objects directory?

 

Thanks

Has anyone managed to deploy a custom javascript button using ANT.

After looking around a bit I can't find any help on this.


An example with package.xml, and the object xml would be much appreciated, as would any pointers on where to look to figure this out.

 

For example, in package.xml, what name do we use in Package/types/name markup. CustomObject?

If CustomObject is correct, what markup should be in the customobject.object file in the objects directory?

 

Thanks

To keep a record unique with respect to three fields, we setup:

 

  • hidden formula field to capture the three part unique key
  • visible text field with unique specified to hold the key
  • field update to move the formula field to the unique field
  • workflow rule to fire the field update on insert or whenever any of the three parts change.

 

 

This scheme works fine, however when running a test method with a bulk insert, the bulk insert fails.

The interesting thing is the insert call does not fail if records are inserted one at a time in a for loop.

The insert call does fail when the records are collected in a List in the for loop and inserted all at once.

 

I speculate that somehow the uniqueness key is cached and verified as unique more than once.

Perhaps the second time it gets verified agianst its cached-recently-verified value, as the error message indicates that the unique record id associated with the uniqueness violation is non other than the just inserted record. A typical error message looks like:

DUPLICATE_VALUE, duplicate value found: Unique_Commodity_LDC_LDC_Account__c duplicates value on record with id: a06Q00000009W5g 

 

The record id a06Q00000009W5g was generated as a result of the insert.

Any ideas on what might be causing the uniqueness-violation-on-bulk-insert behaviour?

 

Thanks