• Murthy vvr
  • NEWBIE
  • 20 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 11
    Replies
I want to delete a record using its external id.

example :

Opportunity opt = new Opportunity();
opt.External_Id__c = ''external id of record'';
delete opt;

is it possible ?

When I do like this getting "System.ListException: Missing id at index: 0" exception.


Thanks in Advance,
Murthy VVR

Hi,

 

      I'm facing a problem while uploading a document into SFDC Documents, i'm unable to reuse the document unique name, even the previous document created with same unique name has been deleted.(From recycle bin also ).

 

Can anyone pls help ?

 

Thanks in advance,

Murthy.

Hi, Is there any way to access existing records of SObject in isInsert block of a trigger. ???

 

          Trigger Trg_name on Sobj_Name(before insert) {

                if(Trigger.isInsert) {

                            //Here i need to access the existing records of Sobject without writing SOQL.

                }

          }

Hi,

 

I'm unable to view "content delivery" option in Customize (in App Setup). Can any one help ???????

 

Thanks in Advance

Hi,

 

      I'm facing a problem while uploading a document into SFDC Documents, i'm unable to reuse the document unique name, even the previous document created with same unique name has been deleted.(From recycle bin also ).

 

Can anyone pls help ?

 

Thanks in advance,

Murthy.

I want to delete a record using its external id.

example :

Opportunity opt = new Opportunity();
opt.External_Id__c = ''external id of record'';
delete opt;

is it possible ?

When I do like this getting "System.ListException: Missing id at index: 0" exception.


Thanks in Advance,
Murthy VVR

Hi, Is there any way to access existing records of SObject in isInsert block of a trigger. ???

 

          Trigger Trg_name on Sobj_Name(before insert) {

                if(Trigger.isInsert) {

                            //Here i need to access the existing records of Sobject without writing SOQL.

                }

          }

Hi,

 

I'm unable to view "content delivery" option in Customize (in App Setup). Can any one help ???????

 

Thanks in Advance

I have an object Job on which I have a trigger which has the code for the generation of the auto number according to the job number of the last created job. (increment value of the job number of the last created job). I am querying the last created job as follows:

[Select Id, Name,Job_Auto_Number__c,Job_Id__c from Job__c ORDER BY Created Date DESC LIMIT 1];

 

I have a VF page on which I am inserting 5 jobs in a list. Some times I am able to insert 5 jobs while some times I get the error 'System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: unknown duplicates value on record with id' .

 

What can be the reason for this error, If it is the same date and time why does it work some times?

How can I overcome this situation? What else can I use instead of created date?

 

Please help,

Thanks in advance.

HI ALL,

 

          I am new to devleopment.  i have  one custom filed in  account  named as 'NoofContacts ' data type is Integer,  i need tigger code  how many contacts are there in particular account, when i am inserting one contact in particular account, hte noofcontact fileld  in account increased one automatically, same as delete contact, the noofcontact  will be decreased, i am able  to do this, but i am logged ate updating the contact , if  i update the contact ,i will change the account,then old acocunt noofcontact filed  willbe decreased by one and new account noofcontacts filed is deleted by one, iam logged here ,plz any one help

 

Test coverage in my package is failing! It seems to be failing on blank lines, closing brackets, random lines in queries and comments. Causing my code coverage to be half (or less) than what it should be!

 

None of this should be scanned.

 

Anyone else getting this problem?

We recently ran into a problem when we create a document via the api when the document name is the same. The error we are getting is

"Create Failed: DUPLICATE_DEVELOPER_NAME: This Document Unique Name already exists.  Please choose a unique name. -- DeveloperName"

I thought that specifying the DeveloperName on the document object would be enough, but when I try that, the error I get is

"Create Failed: INVALID_FIELD_FOR_INSERT_UPDATE: Document: bad field names on insert/update call: DeveloperName -- DeveloperName"

This seems a bit contradictory. Any help would be greatly appreciated. Thanks!

When deactivating user in the salesforce.com user interface you are given three checkboxes:

Remove user from account teams

Remove user from sales teams of closed opps

Remove user from sales teams of open opps. (This one is checked by default).

When deactivating user with the API, do any of the above occur?

  • December 06, 2004
  • Like
  • 0