• Kelly Strauch 2
  • NEWBIE
  • 65 Points
  • Member since 2016

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 11
    Replies
I know there are many Validation rule solutions out there but not finding one for my use case.  We currently allow certain profiles ability to change Opportunity Stage using all encompassing "AND( ISCHANGED( StageName ), 
$Profile.Name <> "System Administrator) - and adding any other profiles, user id's etc we want to by pass this rule.  This works fine.

New requirment is to keep this but add a profile that can change ONLY certain picklist values on the Opportunity stage.  That is where I am stuck. Was thinking I could add that profile to this rule, then create a new rule specifically for the profile that will have partial ability to change stage.  But the original rule overrides the lower limiting rule for the profile.

How can I acheive limiting picklist values for one profile  (ie keeping what we have but prevnting this new profile from changing to close won, closed lost, etc)  while keeping the current rule bypass in place for the other profiles?  Any help would be appreciated
 
I installed DataLoader.io and Java Machine on my PC.

I log with my usual Salesforce User/Pwd, but can't access the Dataloader application.

User-added image

what should I do ?
Hello,

We are getting two errors in our prod environment:
1. Restforce::AuthenticationError: invalid_grant: authentication failure
2. Faraday::ClientError: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.

From reasearching we have determined that its possible our security token may be bad, however, the user our app uses has not changed passwords nor has the password expired. We do know that the REQUEST_LIMIT error is due to our app retrying the failed api calls. However, we need assistance in understanding how the invalid_grant error is occuring. Since we are able to log into Salesforce with the user, its understood that the security token should be good.

Is it possible to get the invalid_grant error if the REQUEST_LIMIT has been met?

Thanks

I'm attempting to get test coverage for my first VF page.  It's a view-only page (there's no place to enter or change data), and it doesn't accept any parameters.

I was hoping that I'd be able to write a test class that inserts some test data and runs the methods in my custom controller (the same way I'd write a test class for any other Apex class), but that's not working.  I'm getting the error message:  "Method does not exist or incorrect signature" when I try to run any methods in my controller from my test class.

What's the missing step?  Put another way:  What's the additional thing you have to add to test classes for VF custom controllers that you don't have to worry about for "normal" Apex classes?

(I've been googling, but everything I can find has to do with testing VF pages that accept a record ID as a parameter, and that's not relevant for me here.)

Apologies first of all -- I know this question has been asked in some form a million times, but I haven't been able to apply other answers I've found to my scenario here.  =/

I've got a SOQL query inside a SOQL for loop.  I know enough to understand why that's bad, but I don't know enough to optimize it.

My relevant code is:

for(Whale_Spend__c ws : lastMonthOlds){
    try{
        myOpp = [SELECT whaleSpend_Amount_Counted__c
                   FROM Opportunity
                  WHERE CloseDate    = :lastDayLastMonth
                    AND AccountID    = :ws.Account__c
                    AND RecordTypeId = '01231000001IctH'
                  LIMIT 1];
        amount = myOpp.whaleSpend_Amount_Counted__c;
    } catch(QueryException q) {
        amount = 0;
    } finally {
        //invoiceAmounts.add(amount);
        System.debug(countB + ' ' + amount);
        ws.This_Months_Spend__c = amount;
        countB++;
    }
}

update lastMonthOlds;
Thank you in advance!
Hello,

We are getting two errors in our prod environment:
1. Restforce::AuthenticationError: invalid_grant: authentication failure
2. Faraday::ClientError: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.

From reasearching we have determined that its possible our security token may be bad, however, the user our app uses has not changed passwords nor has the password expired. We do know that the REQUEST_LIMIT error is due to our app retrying the failed api calls. However, we need assistance in understanding how the invalid_grant error is occuring. Since we are able to log into Salesforce with the user, its understood that the security token should be good.

Is it possible to get the invalid_grant error if the REQUEST_LIMIT has been met?

Thanks

I'm attempting to get test coverage for my first VF page.  It's a view-only page (there's no place to enter or change data), and it doesn't accept any parameters.

I was hoping that I'd be able to write a test class that inserts some test data and runs the methods in my custom controller (the same way I'd write a test class for any other Apex class), but that's not working.  I'm getting the error message:  "Method does not exist or incorrect signature" when I try to run any methods in my controller from my test class.

What's the missing step?  Put another way:  What's the additional thing you have to add to test classes for VF custom controllers that you don't have to worry about for "normal" Apex classes?

(I've been googling, but everything I can find has to do with testing VF pages that accept a record ID as a parameter, and that's not relevant for me here.)

I know there are many Validation rule solutions out there but not finding one for my use case.  We currently allow certain profiles ability to change Opportunity Stage using all encompassing "AND( ISCHANGED( StageName ), 
$Profile.Name <> "System Administrator) - and adding any other profiles, user id's etc we want to by pass this rule.  This works fine.

New requirment is to keep this but add a profile that can change ONLY certain picklist values on the Opportunity stage.  That is where I am stuck. Was thinking I could add that profile to this rule, then create a new rule specifically for the profile that will have partial ability to change stage.  But the original rule overrides the lower limiting rule for the profile.

How can I acheive limiting picklist values for one profile  (ie keeping what we have but prevnting this new profile from changing to close won, closed lost, etc)  while keeping the current rule bypass in place for the other profiles?  Any help would be appreciated
 

Apologies first of all -- I know this question has been asked in some form a million times, but I haven't been able to apply other answers I've found to my scenario here.  =/

I've got a SOQL query inside a SOQL for loop.  I know enough to understand why that's bad, but I don't know enough to optimize it.

My relevant code is:

for(Whale_Spend__c ws : lastMonthOlds){
    try{
        myOpp = [SELECT whaleSpend_Amount_Counted__c
                   FROM Opportunity
                  WHERE CloseDate    = :lastDayLastMonth
                    AND AccountID    = :ws.Account__c
                    AND RecordTypeId = '01231000001IctH'
                  LIMIT 1];
        amount = myOpp.whaleSpend_Amount_Counted__c;
    } catch(QueryException q) {
        amount = 0;
    } finally {
        //invoiceAmounts.add(amount);
        System.debug(countB + ' ' + amount);
        ws.This_Months_Spend__c = amount;
        countB++;
    }
}

update lastMonthOlds;
Thank you in advance!
I installed DataLoader.io and Java Machine on my PC.

I log with my usual Salesforce User/Pwd, but can't access the Dataloader application.

User-added image

what should I do ?

Hi, I'm trying to assign a result of a query to a variable. but i cannot do like that. following is my code.

 

Public decimal Revenue=[select sum(amount) from opportunity];

 

it throws an error as "Illegal assignment from LIST<AggregateResult> to Decimal "..

 

I've also tried with double instead of decimal. it doesn't work.

 

Please give me a solution for my scenario.

  • June 28, 2011
  • Like
  • 0