• vsf
  • NEWBIE
  • 30 Points
  • Member since 2011

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

Hi,

 

I have a status picklist that I would like to track. I created a text field called Previous Status that I would like to display the last status the picklist was set to.

 

I have a workflow set for to fire when the status changes (ISCHANGED) that is working fine. But my field update is populating the text field with numbers (1-4, the number of values on the picklist).

 

I know the problem is with the field update formula, but I'm not sure how to fix. Currently the formula is:

 

PRIORVALUE( Permit_Status__c ) Which I know is wrong.

 

Has anyone done this before?

I am trying a simple Account GET operation on Boomi from Salesforce through REST API. The following is the code in Salesforce which is executed by button click.

public pageReference AccountGet()
{
String username = <Boomi username>;
        String password = <Boomi password>;
Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'BASIC ' +  EncodingUtil.base64Encode(headerValue);
HttpRequest req = new HttpRequest();
        req.setEndPoint('https://platform.boomi.com/api/rest/v1/<Boomi Account Id>/Account/<Boomi Account Name>');
        req.setMethod('GET');
        req.setHeader('Authorization', authorizationHeader);
     
        Http http = new Http();
HttpResponse res = http.send(req);
        
        AccCreateBody = res.getBody();
        AccCreateStatus = res.getStatus();
        AccCreateStatCode = res.getStatuscode();
return null;
}

Execution of the above code results in '500 Internal Server Error'. Any pointers on how to proceed will be greatly helpful.
Thanks!
  • April 10, 2012
  • Like
  • 0

Hi,

 

 

I have made the integration between SalesForce and ZenDesk and I am trying to create a new organization every time a new Account is created in SalesForce. Has somebody done this already? It would be really helpful if somebody could point me to any documents or materials or API samples which dwells into similar scenarios.

 

Thanks!

 

 

  • October 26, 2011
  • Like
  • 0

Hi,

 

 

I have made the integration between SalesForce and ZenDesk and I am trying to create a new organization every time a new Account is created in SalesForce. Has somebody done this already? It would be really helpful if somebody could point me to any documents or materials or API samples which dwells into similar scenarios.

 

Thanks!

 

  • October 26, 2011
  • Like
  • 0

Hi,

 

I have a status picklist that I would like to track. I created a text field called Previous Status that I would like to display the last status the picklist was set to.

 

I have a workflow set for to fire when the status changes (ISCHANGED) that is working fine. But my field update is populating the text field with numbers (1-4, the number of values on the picklist).

 

I know the problem is with the field update formula, but I'm not sure how to fix. Currently the formula is:

 

PRIORVALUE( Permit_Status__c ) Which I know is wrong.

 

Has anyone done this before?

I'm just starting to try out APEX programming, so this is probably going to make experts laugh.......

I have a formula field that strips the Mobile Phone number and only stores numeric data. 
SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( MobilePhone, ")", "" ), "-", "" ), "+", "" ), " ", "" ), "(", "" )

All well and good, then I thought "Can't I just use an APEX trigger to strip those characters out and just store the numeric data in the same field?"

.....well, I failed. The substitute command doesn't compile in APEX. Can someone point in me in the right direction? Or am I barking up the wrong tree here?

    Hi all,

          I want to select a multiple  approver manually in contract. I write  a class of create a approve request ,when i click a custom button of  approve request. but i dont know how to set a userid for request. plz help me. very urgent

 

 

 

public class ContractApprovalRequest
            {
                      
           public ContractApprovalRequest(ApexPages.StandardController controller)
           {   
                                 
           }
                       

        public void ApprovalRequest()
                        {          
             list <Contract_Approvers__c> calist = new list<Contract_Approvers__c>();                         
             for(Contract_Approvers__c caobj : calist){
             caobj = [select id,User__c from Contract_Approvers__c where contract__c=:ApexPages.currentPage().getParameters().get('id')];
             calist.add(caobj);  
             }
            
            Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
             req1.setComments('Submitting request for approval.');
             req1.setObjectId(ApexPages.currentPage().getParameters().get('id'));              
            // req1.setNextApproverIds(calist);
             
             
             
             Approval.ProcessResult result = Approval.process(req1);
                                                     
              }

 

 

Error: Compile Error: Method does not exist or incorrect signature: [Approval.ProcessSubmitRequest].setNextApproverIds(LIST<Contract_Approvers__c>) at line 21 column 14

Hi,

 

Is there any way to connect from Salesforce to bhoomi.

As there is way to connect from Bhoomi to salesforce, but i want to send data from salesforce to FTP VIA Bhoomi.

If any one know about this please reply.

 

Thanks in advance.

I am invoking an approval process in an after update trigger which results in bunch of runtime errors. The approval process works flawlessly when submitted through default "Submit for Approval" button

 

below is my trigger code and the run time error messages 

 

trigger Approval_Process on SPA__c (after update){

for(SPA__c sp: Trigger.new){

if (sp.Submit_for_Approval__c){

Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();

req1.setComments('Submitting request for approval.');

req1.setObjectId(sp.id);

req1.setNextApproverIds(new Id[] {UserInfo.getUserId()});

//req1.setNextApproverIds='005Q0000000IFNf';

Approval.ProcessResult result = Approval.process(req1);

System.assert(result.isSuccess());

System.assertEquals('Pending', result.getInstanceStatus(), 'Instance Status'+result.getInstanceStatus());

}

}

}

 The runtime errors I get are

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

NO_APPLICABLE_PROCESS

 

The detailed message is below

 

Error: Invalid Data. Review all error messages below to correct your data.Apex trigger Approval_Process caused an unexpected exception, contact your administrator:

Approval_Process: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY,

Approval_Process: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process found.: [] Trigger.Approval_Process: line 11, column 45: []: Trigger.Approval_Process: line 11, column 45

 

 

 

 

 

  • January 21, 2010
  • Like
  • 0
Hello.

I have a trigger which creates Approval Requests.  I have the following block of code:

Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();

req1.setComments('Submitting request for approval.');
req1.setObjectId(newOpp.Id);
List<Id> nextAppIdList = new List<Id>();
nextAppIdList.add('00580000001pucY');
nextAppIdList.add('00580000001pucxAAA');
req1.setNextApproverIds(nextAppIdList);
//Submit the approval request for the solution
Approval.ProcessResult result = Approval.process(req1);

Note that there are multiple Approver Ids in the setNextApproverIds() call…

So if I run the code above, I get the following error:

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger opportunityApprovalTrigger caused an unexpected exception, contact your administrator: opportunityApprovalTrigger: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, missing required field: []: Trigger.opportunityApprovalTrigger: line 61, column 45

Note that line 61 is: Approval.ProcessResult result = Approval.process(req1);

However, if I change the code so that I’m only submitting single approver, it works perfectly.  What am I doing wrong?

Thanks
Chris