process automation - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Kaaviya PKaaviya P 

process automation

still geeting error!

Challenge Not yet complete... here's what's wrong:
A validation rule did not prevent an Account's name from being changed when Type is 'Customer - Direct'.

Condition:
​​​​​​​ISCHANGED(Name) && ( ISPICKVAL( Type ,"Customer-Direct") || ISPICKVAL( Type ,"Customer-channel") )
Best Answer chosen by Jyothsna (salesforce.com) 
Krishna DadiKrishna Dadi
HI Kaaviya,
Validation rule seems okay, make sure Validation rule is active .

All Answers

Lakhan MeghaniLakhan Meghani
Hi Kaaviya

Can you please refer this-
https://developer.salesforce.com/forums/?id=9060G000000BgK0QAK
https://trailblazers.salesforce.com/answers?id=9063A000000aJ3UQAU
Krishna DadiKrishna Dadi
HI Kaaviya,
Validation rule seems okay, make sure Validation rule is active .
This was selected as the best answer
Kaaviya PKaaviya P
one more challenge;

what I did wrong?
​​​​​​​
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Opportunity Management” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [AccountId]. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 44701433-132908 (-667225970): []


trigger ClosedOpportunityTrigger on Opportunity (after insert, after update) {

    List<Task> taskList = new List<Task>();
    
    for (Opportunity opp : [SELECT Id, StageName FROM Opportunity WHERE StageName = 'Closed Won' AND Id IN :Trigger.new]){
                    
            taskList.add(new Task(Subject = 'Follow Up Test Task',
                                  WhatId = opp.Id));
       
    }

    if(taskList.size()>0){
        
        insert taskList;
        
    }
    
}
Kaaviya PKaaviya P
yes its active
Lakhan MeghaniLakhan Meghani
Hi Kaaviya
You have any process builder/workflow named “Opportunity Management”
that is creating issue in your automation.

 
Kaaviya PKaaviya P
ok ill check
 
Lakhan MeghaniLakhan Meghani
Yes, 
If that is not required to be a active Process builder/workflow then deactivate it and further proceed for challenge

Thanks
Kaaviya PKaaviya P
I couln't find sir?
Krishna DadiKrishna Dadi
HI Kaaviya,

Can you share the Description mentioned in the challenge to create the Validation rule? 
Lakhan MeghaniLakhan Meghani
Hey Kaaviya

Is it a part of 2nd challenge of Process automation superbadge?

This might help-
https://jayakrishnasfdc.wordpress.com/2018/08/05/process-automation-super-badge/
 
Kaaviya PKaaviya P
I used this link,Still getting error.
Lakhan MeghaniLakhan Meghani
Please post snap of error

I am not getting, which challenge you are solving and what is the issue!!!
The trigger sent by you make no sense , i mean it is nor related to superbadge

Always try to attempt new superbadge in new playground
Kaaviya PKaaviya P
@Lakhan Meghani

I'm trying to solve superbadge process automation step 2,

I followed below link also which one you provide
https://jayakrishnasfdc.wordpress.com/2018/08/05/process-automation-super-badge/  

and I used new playgroung also after that also I'm getting error 

Challenge Not yet complete... here's what's wrong:
A validation rule did not prevent an Account's name from being changed when Type is 'Customer - Direct'.