• poenar ioana 6
  • NEWBIE
  • 0 Points
  • Member since 2017
  • home

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 14
    Replies
Hello, 

I have to bulk insert in two objects which are parent and child. I have mapped parent's external id to child records.

I'm calling batch apex from normal class which inserts both. But Child records cant able to find parent External ID as it runs in parallel instead of one after one. 

Error : System.DmlException: Upsert failed. First exception on row 0; first error: INVALID_FIELD, Foreign key external ID
public static void saveFile()
     {         
              Try
                {                                                
                        if(FinalTarList.size()>0)  // Parent
                         {
                         SPL_BatchImportGild splTar = new SPL_BatchImportGild(FinalTarList); // should execute first
                         Database.executeBatch(splTar,200);
                         success = true;
                         }
                        
                        if(FinalcycdetCopy.size() > 0)
                            {
                             SPL_BatchImportGild splTarDet = new SPL_BatchImportGild(FinalcycdetCopy); // should execute after parent Insertion. 
                             Database.executeBatch(splTarDet,200); 
                            }                            
                 }
                       
          }

Is there a way to achieve this.? please suggest me if there are alternatives. 

Thanks 
Vignesh
Hey guys. I'm irregularly experiencing troubles, that I suddenly cannot close won opportunities. Trying to set an opportunity 'closed won' results in the following error:

The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30124000000LrED . Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.

I tried to use Mayank Srivastava's solution from this post: https://success.salesforce.com/answers?id=9063A0000019NR7QAM
However my Flow designer is completely blank - I cannot see any unsaved flows. (see screenshot)
Any suggestions what I can do?
Much appreciated!

User-added image

Here is the Error-Email Salesforce send to me 

Error element myRule_1_A1 (FlowRecordCreate).
This error occurred when the flow tried to create records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: OrderCreated: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, operation performed with inactive user [00524000001RgP1] as owner of task: [] Trigger.OrderCreated: line 59, column 1. For details, see API Exceptions.

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: Opportunity_Won
Type: Workflow
Version: 22
Status: Active

Flow Interview Details
Interview Label: Opportunity_Won-22_Opportunity
Current User: Clemens Kemper (00524000001SVfn)
Start time: 23.10.2017 13:29
Duration: 0 seconds

How the Interview Started
Clemens Kemper (00524000001SVfn) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 0062400000Zi7uUAAR
myVariable_current = 0062400000Zi7uUAAR

ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "23.10.2017 13:29"

DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.IsWon} (true) Equals true
Logic: All conditions must be true (AND)

DECISION: myRule_1_pmetdec

RECORD CREATE: myRule_1_A1
Create one Order record where:
AccountId = {!myVariable_current.AccountId} (0012400000NH9v4AAD)
Ansprechpartner__c = {!myVariable_current.Ansprechpartner__c} (null)
Auf_Wasser__c = {!myVariable_current.Auf_Wasser__c} (false)
BillingCity = {!myVariable_current.Account.BillingCity} (Düsseldorf)
BillingCountry = {!myVariable_current.Account.BillingCountry} (DE)
BillingPostalCode = {!myVariable_current.Account.BillingPostalCode} (40235)
BillingStreet = {!myVariable_current.Account.BillingStreet} (Schlüterstraße 10)
EffectiveDate = {!myVariable_current.CloseDate} (23. October 2017)
Opportunity__c = {!myVariable_current.Id} (0062400000Zi7uUAAR)
Pricebook2Id = {!myVariable_current.Pricebook2.Id} (01s24000004FUmIAAW)
Rechnungsdatum__c = {!myVariable_current.CloseDate} (23. October 2017)
Status = Draft
Veranstaltungsart__c = {!myVariable_current.Veranstaltungsart__c} (Silvesterfeuerwerk)
Z_nddatum__c = {!myVariable_current.Z_nddatum__c} (31. December 2017)
Z_ndzeit__c = {!myVariable_current.Z_ndzeit__c} (0:00)
berraschung_f_r__c = {!myVariable_current.berraschung_f_r__c} (null)
ueberraschung__c = {!myVariable_current.berraschung__c} (false)
Result
Failed to create record.
Hi All,

I would like to inform you that, I have added ip address under the System Administrator profile and after that my IP got refreshed.

I also tried to reset the password but getting below mail message:

---------------------
We recently received a request to reset the Salesforce password for the username abhinav3.saxena@gmail.com.trails1.

For security reasons, your Salesforce administrator hasn’t approved logging in or resetting your password from the network location you used. Try logging in again by connecting to an approved network location and logging in with your existing password. If you still have issues, reset your password from that approved location.

If you didn't ask for your password to be reset, contact your Salesforce administrator.
---------------------

Please help me to remove this as this is my main developer org and trailhead is also attached with this account. I am so much worrying to retrieve this developer org. Please help me :(

Regards,
Abhinav