• Thrantor2
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I've got an approval process that uses three steps... the first two are optional... Not all records will follow down into that path.

 

If we submit a record that ignores those two steps the third step uses the correct manager. IE the manager of the record owner(as configured in the approval process)

 

But for some ungodly weird reason, if the other two steps are entered then the approval process tries to route the next step to the manager of the person who approved steps 1 or 2. From my understand and the way it reads... anytime it uses the automagical route to manager it should use the manager of the original owner.

 

Suggestions? Thoughts that this is an annoying stupid bug?

 

I really just want the approval process to have step 3 go to the manager of the record owner for all events. Help!

Hi,

I have written an s-control for some standard and custom objects to override the "Add" buttons.  The "Add" buttons on the standard object Opportunity Product works fine with the code below (The object name in red is replaced with the Opportunity Product of course).  The problem happens when I try to use a custom object called "Sales_Credit__c".  When the function below runs, it seems to call the s-control twice because I get the alert message (highlighted in blue) twice, where the 2nd time around Opportunity.Id, and Opportunity.Name are blank.  Then I get a blank page in the web browser with a URL stating: https://na3.salesforce.com/servlet/servlet.Integration?lid=*deleted for post*&ic=1#Error!

function successInit(queryResult)
 {
    var records = queryResult.getArray('records');
    qrysize= queryResult.size;
    var it = new sforce.QueryResultIterator(queryResult);

    while(it.hasNext() )
    {
        var record = it.next();
        gProfileId=record.Profile_Identifier__c;
        if (gProfileId == 'Admin' )
        {
            alert("ProfileId=" + gProfileId + ", Opp.: " + '{!Opportunity.Id}' + ", " + '{!Opportunity.Name}');
            window.parent.location.href="{!URLFOR($Action.Sales_Credit__c.New,  Opportunity.Id,  [retURL=URLFOR($Action.Opportunity.View, Opportunity.Id)], true)}";
           
        }
        else
        {
                searchstring0="select Id, Opportunity_Number__c, Submit_to_ERP__c from Opportunity WHERE Id = '{!Opportunity.Id}' LIMIT 1 ";
                 queryResult= sforce.connection.query(searchstring0, ERPcallback);
        }
    }
}

Then I have also done it with the href set with variables, and then I get the New sales credit screen, but don't have the variables assigned.

window.parent.location.href="{!URLFOR($Action.Sales_Credit__c.New,  null,  [retURL=URLFOR($Action.Opportunity.View, Opportunity.Id),Opportunity=Opportunity.Name], true)}";

Also, the "Sales_Credit__c" object has a master-detail realtionship to Opportunity!

Any information to point me in the right direction will be greatly appreciated.

Thanks in advance