• Fabio Palladino
  • NEWBIE
  • 135 Points
  • Member since 2016
  • NTTDATA


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

Hi all,

  Created a process where when a lead enters a new "lead status" it ticks the appropriate checkbox.  Pretty simple stuff (or so I thought).  Recieved an email with a number of (a lot) of messages similar to the below.  I don't have a developer background.... Could anyone parse out what's going on here?  Any help is greatly appreciated!

 

An error occurred at element myRule_13_A1 (FlowRecordUpdate).
UPDATE --- UPDATE FAILED --- ERRORS : (CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY) Deskcom.LeadConversionDeskCaseUpdate: System.LimitException: Apex CPU time limit exceeded, 

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.

Flow Details
Flow Name: New_Lead_Status_Stages_Update_Checkboxes
Type: Workflow
Version: 1
Status: Active

Flow Interview Details
Interview Label: 
Current User: John Levitt (00560000002sLhx)
Start time: 8/11/2016 12:00 AM
Duration: 13 seconds

How the Interview Started
John Levitt (00560000002sLhx) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 00Q3200001BIRNcEAP
myVariable_current = 00Q3200001BIRNcEAP

ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "8/11/2016 12:00 AM"

DECISION: myDecision

DECISION: myDecision2

DECISION: myDecision4

DECISION: myDecision6

DECISION: myDecision8

DECISION: myDecision10

DECISION: myDecision12
Executed this outcome: myRule_13
Outcome conditions: and
1. {!myVariable_current.New_Lead_Status__c} (S Accepted L - Contacted/Working) Equals S Accepted L - Contacted/Working
Logic: All conditions must be true (AND)

RECORD UPDATE: myRule_13_A1
Find all Lead records where:
Id Equals {!myVariable_current.Id} (00Q3200001BIRNcEAP)
Update the records’ field values.
NLS_Stage_SAL_C__c = true
Result
Failed to update records that meet the filter criteria.

Hi All,

I am trying to insert a list of related records in Apex and found the documentation that explains how to do so for inserting 1 parent and 1 child record. Here is the snippet I am talking about and link for the same:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_foreign_keys.htm
public class ParentChildSample {
    public static void InsertParentChild() {
        Date dt = Date.today();
        dt = dt.addDays(7);
        Opportunity newOpportunity = new Opportunity(
            Name='OpportunityWithAccountInsert',
            StageName='Prospecting',
            CloseDate=dt);
        
        // Create the parent reference.
        // Used only for foreign key reference
        // and doesn't contain any other fields.
        Account accountReference = new Account(
            MyExtID__c='SAP111111');                
        newOpportunity.Account = accountReference;
        
        // Create the Account object to insert.
        // Same as above but has Name field.
        // Used for the insert.
        Account parentAccount = new Account(
            Name='Hallie',
            MyExtID__c='SAP111111');      
        
        // Create the account and the opportunity.
        Database.SaveResult[] results = Database.insert(new SObject[] {
            parentAccount, newOpportunity });
        
        // Check results.
        for (Integer i = 0; i < results.size(); i++) {
            if (results[i].isSuccess()) {
            System.debug('Successfully created ID: '
                  + results[i].getId());
            } else {
            System.debug('Error: could not create sobject '
                  + 'for array element ' + i + '.');
            System.debug('   The error reported was: '
                  + results[i].getErrors()[0].getMessage() + '\n');
            }
        }
    }
}

Now I want to replicate this functionality to insert a List of related records instead of a single record and I get an error when I just change the below line from documentation :

// Create the account and the opportunity.
Database.SaveResult[] results = Database.insert(new SObject[] { parentAccount, newOpportunity });

To:

// Create the account and the opportunity.
Database.SaveResult[] results = Database.insert(new SObject[] { parentAccountLIST, newOpportunityLIST });


Any help on what parameters change for inserting a list will be of great help.

Thank you!!


 
We need to be able to auto populate from the Grading field by Potential Yield field. 
Platinum= 750+ 
Gold= 250k-750K 
Silver= 0k-250k 
 so I created a potential yield as number field and activated  3 workflow rules with field update Grading but its not working
 
Hello,

I have an object like below

Custom_Object_ABC__c (Object name)
CreatedBy
Owner
Custom_field1__c (Type number)

the above object will have many records (record1, record2, etc)

I wantt that the OWNER of record1 can modify or enter in field Custom_field1__c of record1,
similarlly, the OWNER of record2 can enter or modify the number in Custom_field1__c of record2

what are ways i could do it
Thank you for suggestion !
  • August 11, 2016
  • Like
  • 0
Hi all, I want to do the follow:
  1. Create more than one repositories on my github repo with some custom code or corg configurationns like an utility repo
  2.  I want to maintain this repo and download these utility in a working sandbox. .
Any suggestion on wich tool I can use and in wich mode?
Hi All,
I need to create a custom action for LEX environment placed in a detail page of custom Object.
This action must execute a JS remote invocation to an apex class that update one field on record in context.
After this the record must be refreshed and new value of custom field displayed.
I have created:
  • An Apex controller extension for custom Object that performs field update on the record visualized (@remote method) 
  • A VF page that embed JS remote invocation to Apex method
  • A custom Action of type "Custom Visualforce"
I added the action on Object Page Layout and It works but when I click on the button I visualize, for a few seconds, a blank popup page like this:
Blank VF page

I don't need to visualize any Grafical VF page I only need to perform JS invocation.
This is VF page:
<apex:page standardController="Quote__c" extensions="Test4SyncController" docType="html-5.0" standardStylesheets="false" showheader="false" sidebar="false">

<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script>
<script>
    
    UpdateAccount();


function UpdateAccount(){
    aId = '<apex:outputText value="{!Quote__c.Id}"/>';
    
    Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.Test4SyncController.updateAccount}', aId,
                                              function(result, event){;
                                                                      if(event.status){
                                                                          // Success - close the publisher and refresh the feed.
                                                                          Sfdc.canvas.publisher.publish({name: "publisher.close", payload:{ refresh:"true"}});  
                                                                      } else if (event.type === 'exception'){
                                                                          console.log(result);
                                                                      } else {
                                                                          
                                                                      }
                                                                     });
}

</script>       


</apex:page>

You know any way to perform this requirement ?

Thanks in advance for your reply
Hi all,
is it possible to get the initial Approval Process submitter for a specific object through apex code ?
I searched around but I could not find a SOQL statement for this purpose.

Thanks in advance

Fabio
 
Hi everyone,

I think that I found a bug in the screen flow component "reference" when referencing a filtered lookup. Salesforce support told me to ask here about it.

Here the official documentation : https://help.salesforce.com/articleView?id=flow_ref_elements_screencmp_lookup.htm&type=5

How to reproduce :
1 - create a new lookup field from contact to account "account2" without filtering
2 - create a simple screen flow with only a reference component using this new lookup
flow setup3 - test it : you find all your account
User-added image4 - add a filter on the lookup to display only the account of the contact
User-added image5 - nothing in the flow now :
User-added imageI have the same results if the filter is optional.

Did i missunderstand something ? Or is this a bug ?
I would like to count number of unique opportunities which has increased in amount value in its latest transactions, from opportunity field history table.
SELECT opportunityId, newValue,oldValue  FROM OpportunityFieldHistory where createdDate IN ( select max(createdDate) FROM OpportunityFieldHistory where field ='amount' group by opportunityId)

This isn't working. I couldn't use new value and old value too in where clause, to check whether amount is increased. Is there any way to do this?  
Hello Everyone

Here below a remark about this trail :
Trail : Build a Suggestion Box App | Adding Business Logic | Step 2: Add a Validation Rule | point nb 9

9. Check whether the Implemented Date field is populated by typing the following in the Formula Editor: NOT(ISBLANK( [Suggestion__c].Implemented_Date__c ))

User-added image


I think It'll be better & easier (for Key Users or Functional consultants like me) to use this criteria :
User-added image

What do you think ? Thx for your feedback.

By the way : Process Builder is great !

Regards
Rémi
 
  • August 16, 2016
  • Like
  • 0
Hi All,
Is it possible to create two approval process on same object through trigger?If yes please give me a sample code for refernce

Regards,
Sridhar 
Getting the following exception on email alert action when related user value is used as Email recipient.  
"The record couldn’t be saved because it failed to trigger a flow"

Hi all,

  Created a process where when a lead enters a new "lead status" it ticks the appropriate checkbox.  Pretty simple stuff (or so I thought).  Recieved an email with a number of (a lot) of messages similar to the below.  I don't have a developer background.... Could anyone parse out what's going on here?  Any help is greatly appreciated!

 

An error occurred at element myRule_13_A1 (FlowRecordUpdate).
UPDATE --- UPDATE FAILED --- ERRORS : (CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY) Deskcom.LeadConversionDeskCaseUpdate: System.LimitException: Apex CPU time limit exceeded, 

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.

Flow Details
Flow Name: New_Lead_Status_Stages_Update_Checkboxes
Type: Workflow
Version: 1
Status: Active

Flow Interview Details
Interview Label: 
Current User: John Levitt (00560000002sLhx)
Start time: 8/11/2016 12:00 AM
Duration: 13 seconds

How the Interview Started
John Levitt (00560000002sLhx) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 00Q3200001BIRNcEAP
myVariable_current = 00Q3200001BIRNcEAP

ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "8/11/2016 12:00 AM"

DECISION: myDecision

DECISION: myDecision2

DECISION: myDecision4

DECISION: myDecision6

DECISION: myDecision8

DECISION: myDecision10

DECISION: myDecision12
Executed this outcome: myRule_13
Outcome conditions: and
1. {!myVariable_current.New_Lead_Status__c} (S Accepted L - Contacted/Working) Equals S Accepted L - Contacted/Working
Logic: All conditions must be true (AND)

RECORD UPDATE: myRule_13_A1
Find all Lead records where:
Id Equals {!myVariable_current.Id} (00Q3200001BIRNcEAP)
Update the records’ field values.
NLS_Stage_SAL_C__c = true
Result
Failed to update records that meet the filter criteria.

Hi ,

Iam trying query all the engagement products except except one product with name contains 'Exclude Producr'

lstEngageProduct = [Select Id, CurrencyIsoCode, Name, FTE__c,Available_FTE_s__c, Product__r.Name, Quantity__c, Total_Price__c, Engagement__c from Engagement_Product__c   where Engagement__c =: ApexPages.currentPage().getParameters().get('Id')  AND NOT((Product__r.Name).contains('Exclude Producr'))  ];

But iam getting error ,Can some one help me  on this to exclude the product.

Thanks
Lokesh
I am new to validation rules.. trying to create a rule that certain opportuntiy stages can't have blank or zeros in the amount field. The below rule works if the field is Blank.. but if the field has $0.00.. it does not..I have tried several things.. I got the rule to give warning on $0.00.. but then yoo could not change the field. 

AND (
     ISPICKVAL( StageName, "Negotiate Revisions"),
     ISBLANK (Amount))

Thanks!

 
Hi All,

I am trying to insert a list of related records in Apex and found the documentation that explains how to do so for inserting 1 parent and 1 child record. Here is the snippet I am talking about and link for the same:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_foreign_keys.htm
public class ParentChildSample {
    public static void InsertParentChild() {
        Date dt = Date.today();
        dt = dt.addDays(7);
        Opportunity newOpportunity = new Opportunity(
            Name='OpportunityWithAccountInsert',
            StageName='Prospecting',
            CloseDate=dt);
        
        // Create the parent reference.
        // Used only for foreign key reference
        // and doesn't contain any other fields.
        Account accountReference = new Account(
            MyExtID__c='SAP111111');                
        newOpportunity.Account = accountReference;
        
        // Create the Account object to insert.
        // Same as above but has Name field.
        // Used for the insert.
        Account parentAccount = new Account(
            Name='Hallie',
            MyExtID__c='SAP111111');      
        
        // Create the account and the opportunity.
        Database.SaveResult[] results = Database.insert(new SObject[] {
            parentAccount, newOpportunity });
        
        // Check results.
        for (Integer i = 0; i < results.size(); i++) {
            if (results[i].isSuccess()) {
            System.debug('Successfully created ID: '
                  + results[i].getId());
            } else {
            System.debug('Error: could not create sobject '
                  + 'for array element ' + i + '.');
            System.debug('   The error reported was: '
                  + results[i].getErrors()[0].getMessage() + '\n');
            }
        }
    }
}

Now I want to replicate this functionality to insert a List of related records instead of a single record and I get an error when I just change the below line from documentation :

// Create the account and the opportunity.
Database.SaveResult[] results = Database.insert(new SObject[] { parentAccount, newOpportunity });

To:

// Create the account and the opportunity.
Database.SaveResult[] results = Database.insert(new SObject[] { parentAccountLIST, newOpportunityLIST });


Any help on what parameters change for inserting a list will be of great help.

Thank you!!


 
We need to be able to auto populate from the Grading field by Potential Yield field. 
Platinum= 750+ 
Gold= 250k-750K 
Silver= 0k-250k 
 so I created a potential yield as number field and activated  3 workflow rules with field update Grading but its not working
 
Hello,

I have an object like below

Custom_Object_ABC__c (Object name)
CreatedBy
Owner
Custom_field1__c (Type number)

the above object will have many records (record1, record2, etc)

I wantt that the OWNER of record1 can modify or enter in field Custom_field1__c of record1,
similarlly, the OWNER of record2 can enter or modify the number in Custom_field1__c of record2

what are ways i could do it
Thank you for suggestion !
  • August 11, 2016
  • Like
  • 0
Hi all,
is it possible to get the initial Approval Process submitter for a specific object through apex code ?
I searched around but I could not find a SOQL statement for this purpose.

Thanks in advance

Fabio
 
Hi everyone,

I think that I found a bug in the screen flow component "reference" when referencing a filtered lookup. Salesforce support told me to ask here about it.

Here the official documentation : https://help.salesforce.com/articleView?id=flow_ref_elements_screencmp_lookup.htm&type=5

How to reproduce :
1 - create a new lookup field from contact to account "account2" without filtering
2 - create a simple screen flow with only a reference component using this new lookup
flow setup3 - test it : you find all your account
User-added image4 - add a filter on the lookup to display only the account of the contact
User-added image5 - nothing in the flow now :
User-added imageI have the same results if the filter is optional.

Did i missunderstand something ? Or is this a bug ?