• 0 Points
  • Member since 2008

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 6

My packaging org was upgraded to Summer '10 this past weekend.  Since that happened I am unable to deploy classes to the packaging org.  I consistently get an error "An unexpected error occurred.  Please include this ErrorId if you contact support: 1478925739-55 (-210895607).


Has anyone else seen this and do you have any idea how to get around the problem?  I have tried saving class files individually, deploying with the IDE and using the migration tool

Hi, I'm trying to perform an approval action through APEX code, in an extended controller.  

First I do a Submit for Approval, overwriting the standard one with a visualforce custom button. Here is the code in my extended controller:


public PageReference submitApproval() { // Create an approval request for the account Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest(); req1.setComments('Submitting request for approval.'); req1.setObjectId(purchaseRequisitionObj.id); // Submit the approval request for the account Approval.ProcessResult result = Approval.process(req1); return Page.PR_Detail_VF; }

After that event, the object left in "Pending" approval state. Then in my detail visualforce page, for specific cases, I have a "Direct Approval" button. That button should perform the instance approval changing its state to "Approved". Here is where I'm stuck, because I can not find the way to get the WorkitemId of the request. I mean the workitemId of the instance I asynchronously approved before. This is the code:


public PageReference directApproval() { // Instantiate the new ProcessWorkitemRequest object and populate it Approval.ProcessWorkitemRequest req2 = new Approval.ProcessWorkitemRequest(); req2.setComments('Direct approval by requester'); req2.setAction('Approve'); req2.setNextApproverIds(new Id[] {UserInfo.getUserId()}); req2.setWorkitemId("FROM WHERE I CAN GET THIS ID??"); // Submit the request for approval Approval.ProcessResult result2 = Approval.process(req2); return Page.PR_Detail_VF; }


Any cue will be highly appreciated. Many thanks in advance Fernando.-


  • July 14, 2009
  • Like
  • 0



I am having two tabs in my Visualforce page. Each tab is referring to a component.


I have visual force page using standard controller with multiple extensions.Am using custom save functionality for saving the records.


Am unable to get the syntax for how to call save methods of multiple extensions on single click.


I tried in the following way.

<apex:page standardController="Order_Line_Item__c" action="{!init}" extensions="picklistvalues,Backup1"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Custom Save" action="{!cmdsave}"/> </apex:pageBlockButtons> <apex:tabPanel > <apex:tab label="Access & Port"> <c:AccessPort ControllingPicklist="{!ControllingPicklist}" ControllingPicklistOptions="{!AccTypeOptions}" CustInt="{!CustInt}" CustIntOptions="{!CustIntOptions}"/> </apex:tab> <apex:tab label="Backup"> <c:Backuptest Backup="{!bkp}"/> </apex:tab> </apex:tabPanel> </apex:pageBlock> </apex:form> </apex:page>

cmdsave function exists in the picklistvalues controller. I am trying to call the save function of Backup1 from this method.

But it is saving only the records which belong to the cmdsave method. When we check in debug logs the records in the save method

of backup1 controller is null.


Backup1 BackupClass=new Backup1(); public void cmdsave(){ system.debug('ssssssssssss'+AccportRecords.size()); for(Integer i=0;i<AccportRecords.size();i++){ if(AccportRecords[i].Order_Line_Item__c==null) AccportRecords[i].Order_Line_Item__c=OrderLineId; if(i==0){ AccportRecords[i].Access_Type__c=ControllingPicklist; system.debug('ssssssssssss'+AccportRecords[i].Access_Type__c); AccportRecords[i].Customer_Interface__c=CustInt; } } Upsert AccportRecords; system.debug('ssssssssssss'+AccportRecords); BackupClass.BackupSave(); }



public void save(){ for(integer i=0;i<objAccportlist.size();i++) { if(objAccportlist[i].Order_Line_Item__c==null) objAccportlist[i].Order_Line_Item__c='a0gR0000000YmIzIAK'; } upsert objAccportlist; system.debug('backupinserted'+objAccportlist); //picklistclass.cmdSave(); }

Any help is appreciated.




I have trouble assigning a campaign to a new lead.
I get 'Invalid foreign key relationship name Campaign' error.
I tried this well but it did not work either
lead.Campaign = "70120000000AZc3AAG";

protected void Page_Load(object sender, EventArgs e)


if (Page.IsPostBack)


String FirstName = txtFirstname.Text;

String LastName = txtLastname.Text;

String Company = txtCompany.Text;

String EmailAddress = txtEmailAddress.Text;

if (login() == true)


sforce.QueryResult _qr = null;

binding.QueryOptionsValue = new sforce.QueryOptions();

binding.QueryOptionsValue.batchSize = 1;

binding.QueryOptionsValue.batchSizeSpecified = true;

_qr = binding.query("Select id, Name from Campaign where Name = 'Test 1'");

for (int x = 0; x < _qr.records.Length; x++)


sforce.Campaign Update_c = new Campaign();

sforce.Campaign c = (sforce.Campaign)_qr.records[x];

Update_c.Id = c.Id;

Lead lead;

sObject[] leads = new sObject[1];

for (int j = 0; j < leads.Length; j++)


lead = new Lead();

lead.FirstName = FirstName;

lead.LastName = LastName;

lead.Company = Company;

lead.Email = EmailAddress;

lead.LeadSource = "Test";

lead.Campaign = Update_c;

// lead.Campaign = "70120000000AZc3AAG";

leads[j] = lead;



SaveResult[] sr = binding.create(leads);

for (int j = 0; j < sr.Length; j++)


if (sr[j].success)


Debug.WriteLine("Lead successful added to Salesforce");




for (int i = 0; i < sr[j].errors.Length; i++)


//Get all the next error

Error err = sr[j].errors[i];









  • November 12, 2008
  • Like
  • 0
Previous to updating to 8.0 we had some code that would update fields on Opportunities. After updating to 8.0 we get this failure (there has been no other change in the code besides the update):

AxisFault: A duplicate value was specified for field 'Consulting_Amount__c' in object 'Opportunity', duplicate value '0.0' prior value '' (prior value could have been set to '' with 'fieldsToNull')

Does anyone have a clue why this would be?