• Tall 642
  • NEWBIE
  • 0 Points
  • Member since 2010

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

I have implemented some code from developerforce to the auto-clomplete milestones, and in doing so I am getting the error in the Subject line. I'm not sure what is going wrong, here are the segments where tests are indicating being broken:

 

  Entitlement entl = [select id from Entitlement limit 1];
        String entlId;
        if (entl != null)
          entlId = entl.Id;

here is the link to the code that I am using. Any help would be appreciated:

 

http://wiki.developerforce.com/index.php/Case_Milestones_Utilities_Class

 

 

I'm looking for some Sample APEX that would, upon Case creation, do a lookup to the Contacts Account and find the Entitlement Associated to the Account.  In my case, there will only ever be one Entitlement associated to an Account so the results would return one record.  I need this entitlement to be automatically associated to the Case and automatically kick off.  Essentially, when a case is created, I need the entitlement to kick off immediately.  Does anyone have any sample APEX I can look at that might point me in the right direction.

Hi,

 

I want to be able to add followers to an opportunity. Does anyone know how to do this.

 

this use case is that I have an opportunity and that I want to get some other people involved, do get them involved I want to add them on as followers. I want the adding of the users to be driven from the user level

I can approve a ProcessInstanceWorkitem using Apex or the API, but I just can't figure out how to write the same code using the Ajax Toolkit in javascript? 

 

I see the Process Request function and the ProcessWorkItemRequest Function in the connection.js file, but not sure how to use it.

 

Below is the code to approve using Apex

//I query for the ProcessInstanceWorkitem associated to the parent object Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest(); req.setComments('Approving request.'); req.setAction('Approve'); req.setNextApproverIds(new Id[] {tumgr.Id}); //Use the ID from the newly created item to specify the item to be worked req.setWorkitemId(ProcessInstanceWorkitem.Id); //pass id queried //Submit the request for approval Approval.ProcessResult result = Approval.process(req); //Verify the results System.assert(result.isSuccess(), 'Result Status:'+result.isSuccess());

 

Any help is greatly apprieciated, thanks.