• Michael Konyk
  • NEWBIE
  • 4 Points
  • Member since 2015
  • force.com dev
  • Symphony Solutions


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

"Challenge not yet complete... here's what's wrong: 
Account setup for challenge incomplete. Please add 'Prospect', 'Customer' and 'Pending' picklist values to the Account 'Type' field"


Working on the challenge for 
Process Automation: Routing Records with Approvals

Everything is lock-tight except for one detail pictured in screenshot.

I felt like I tried every permutation in the book to fix this (all acounts are synced, all process is in order, I have reset, redefined and created everything that seems feasable) but apparently I am missing this, or it would have worked. Any advice would be greatly appreciated.User-added image

Thank you!

Here is my version of the Trailhead Valication Rule:

AND (
NOT (ISBLANK(  AccountId  )),  
MailingPostalCode <>  Account.ShippingPostalCode   )

I tried it out and it works fine (checked syntax and also tried to create a contact with a different zip than the account and got the error, corrected the zip and the contact was saved).  But I get this error in Trailhead.

"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: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contacts associated with an Account must have the same Mailing Postal Code as the Account Shipping Postal Code: [MailingPostalCode]"

Am I blind and missing something?????
This is a bit of breif bit of code:

controller:
<pre>

public List<String> partTypes = new List<String>{'Accessories', 'Electronics', 'Fishing', 'Fun and Entertainment', 'Graphics and Decals', 'Pontoon Covers', 'Safety', 'Seating', 'Trailering and Covers'};

 public Map<String, List<Product2>> availablePartOptions{ get; set;}
.
.
.
List<Product2> boatOptions = [SELECT Id, Name, RecordType.Name, Family,
                                                        (SELECT Id, Name, UnitPrice, Pricebook2Id
                                                          FROM PricebookEntries WHERE Pricebook2Id = :pb2Id),
                                                        (SELECT Id, Standard__c, Maximum__c FROM From_Product_Options__r)
                                                        FROM Product2
                                                        WHERE Id IN :ids];

availablePartOptions = new Map<String,List<Product2>>();
for(String partName : partTypes) {
   availablePartOptions.put( partName, new List<Product2>() );
 }

for(Product2 opt: boatOptions() ) {
  if(opt.RecordType.Name == 'Part'){
    availablePartOptions.get(opt.Family).add(opt);
  }
}

</pre>

Visualforce test:

<pre>

<ul>
    <apex:repeat value="{!availablePartOptions}" var="key">
        <li>
              <apex:outputText value="{!key}" /> -
               <apex:outputText value="{!availablePartOptions[key].size}" />
        </li>
    </apex:repeat>
</ul>

</pre>

This all results in:

Incorrect parameter type for subscript. Expected Number, received Text
Error is in expression '{!availablePartOptions[key].size}' in component <apex:outputText> in page boatbuilder

If I omit the offending line I get a ugly but valid list of keys which is the same as my partTypes List

Accessories -
Electronics -
Fishing -
Fun and Entertainment -
Graphics and Decals -
Pontoon Covers -
Safety -
Seating -
Trailering and Covers -

This is the method every doc I have read said to use when dealing with maps in visualforce.
If anyone has any Ideas it would be a tremendous help