• Henrik Helt
  • NEWBIE
  • 5 Points
  • Member since 2010
  • Salesforce Senior Consultant
  • Corpital P/S

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 8
    Replies
Hi
I am playing around with the Trialhead challange "Convert the criteria for Opportunity workflow rules into process criteria". I have created a new hands-on org for this challange, because I also failed to check the challange in my existing org.

Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: XNUFXEJY

Thanks 
Henrik
 
Hi

I have created a very simple headless flow.

A Record Lookup (custom object) followed by a Record Create (Contact) and finally a Record Update (the same custom object). A workflow trigger it.

When creating a new record in my custom object the Contact record is created as expected and in addition the record update works as expected.
If I for example uploads several records to my new object (x creates) my flow execudes, unfortunately instead for creating x numbers of new different Contacts it creates x numbers of similar Contacts.

Any ideas?

Validate Opportunity Close Date > Task Due Date when saving a task?

  • I want to be able to validate if the due date on a Task associated to an opportunity is valid, it means that the Task Due Date has to me less than Opprotunity Close Date. It should not be possible to create a new task which Due Date is greater than the Opportunity Close Date.
  • When creating a new Task and selecting a Task Due Date and pressing Save I want Salesforce to validate if Due Date < Opportunity Close Date. If the validation return FALSE an errormessage has to pop up telling you have to eighter change the Task Due Date or the Opprotunity Close Date.

 

If possible I would like to make a validation directly on Due Date and Close Date, but it is not possible to make that validation as far as I can figure out.

 

Anybody out there who already has an solution?  

Thanks a lot. 

In our scheduled daily flow, which runs every morning, we fairly regularly get an error that the parent object ("Parent") of the object the flow is running on and updating ("Child") causes an UNABLE_TO_LOCK_ROW error, specifically referencing that Parent records are being locked multiple times and throwing an error. This seems to be because Child records that have the same parent are running/updating in parallel, in different batches, which causes the lock on the parent to be tripped twice (causing the error). There are no conflicting Apex jobs or other scheduled flows scheduled anywhere near this time period, and it is scheduled at a time where we do not have employees working.

I would like to know if there is any way to either
1) run the batches in a scheduled Flow serially, instead of in parallel, or
2) ensure that all child records with the same parent record are included in the same batch, so that the lock does not get placed twice and cause an error.
I am getting this error when trying to do the "Lightning Experience Rollout Specialist"

The AccountTab Visualforce page does not include one or both of the following: the apex:slds tag in the page, or the slds-table value in the table.


My code is as follows:
 
<apex:page standardStylesheets="false" standardController="Account" recordSetVar="accounts" tabStyle="account" applyHtmlTag="false" applyBodyTag="false" showHeader="false">
   <head>
       <apex:slds />
    </head> 
	<body>
    <div class="slds-scope">     
        <table class="slds-table">
  			<thead>
    			<tr class="slds-text-title_caps">
      				<th scope="col">
        				<div class="slds-truncate" title="{!$ObjectType.Account.Fields.Name.Label}">{!$ObjectType.Account.Fields.Name.Label}</div>
      				</th>
    			</tr>
  			</thead>
  			<tbody>
    			<apex:repeat value="{!accounts}" var="a">
                <tr>
                  <td data-label="Account Name">
                    <div class="slds-truncate" ><apex:outputLink value="{!URLFOR($Action.Account.View, a.id)}">{!a.name}</apex:outputLink></div>
                  </td>
      
    			</tr>
                </apex:repeat>
            </tbody>
        </table>
     <!--   
     <div class="slds-scope">
        <apex:pageBlock >
            <apex:pageBlockTable value="{!accounts}" var="a" styleClass="slds">
                <apex:column headerValue="{!$ObjectType.Account.Fields.Name.Label}">
                    <apex:outputLink value="{!URLFOR($Action.Account.View, a.id)}">{!a.name}</apex:outputLink>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>-->
    </div>
        </body>
</apex:page>

 
Hi
I am playing around with the Trialhead challange "Convert the criteria for Opportunity workflow rules into process criteria". I have created a new hands-on org for this challange, because I also failed to check the challange in my existing org.

Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: XNUFXEJY

Thanks 
Henrik
 

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
In our scheduled daily flow, which runs every morning, we fairly regularly get an error that the parent object ("Parent") of the object the flow is running on and updating ("Child") causes an UNABLE_TO_LOCK_ROW error, specifically referencing that Parent records are being locked multiple times and throwing an error. This seems to be because Child records that have the same parent are running/updating in parallel, in different batches, which causes the lock on the parent to be tripped twice (causing the error). There are no conflicting Apex jobs or other scheduled flows scheduled anywhere near this time period, and it is scheduled at a time where we do not have employees working.

I would like to know if there is any way to either
1) run the batches in a scheduled Flow serially, instead of in parallel, or
2) ensure that all child records with the same parent record are included in the same batch, so that the lock does not get placed twice and cause an error.