• Greg Meszaros
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I am trying to search through all records passed in by trigger and find ones where buyer zip codes matches an open Open Territory. The "Name" field on Open_Territory__c contains zip codes.

I am getting 2 errors. Variable does not exist: Name, and DML requires SObject or SObject list type: List<Id>.

Any help would be appreciated. 
 
public static void setOpenTerritory(List<dealer__Sales_Up__c> triggerValues) {
        List<Open_Territory__c> openList = [SELECT Id, Name FROM Open_Territory__c WHERE Is_Active__c = true];
        List<Id> suToUpdate = new List<Id>();
        System.debug('openList contains ' + openList);
        // Search through all Sales Ups passed in trigger. Find ones with buyer zip codes matches Open Territory zip and add them to List.
        for(dealer__Sales_Up__c s : triggerValues) { 
            if(s.dealer__Mailing_Zip__c === openList.Name){
                s.Open_Territory__c = true;
                suToUpdate.add(s.Id);
            }
        }
        update suToUpdate;
    }

 
I have a visualforce page that, amongst other things, contains 2 fields. One is a State field and the other is a County field. The County field contains a list of all the Counties in a "Tax Zone" custom object.

I am trying to modify the code so that the County list only contains Counties from whatever State has been typed in the State field. There is currently a getter method that runs on page load that adds items in the County list field regardless of the state.

I want to use rerender to accomplish this but I am new to development and a little out of my league here. Can someone please help???

Here is the VF page:
<apex:inputField type="text" html-ff="Desking:frm:county" styleClass="form-control" style="text-transform: uppercase;" id="state" value="{!dealer__Deal__c.State__c}" >
     <apex:actionSupport event="onchange" rerender="county" />             
</apex:inputField>



<apex:inputField type="text" html-ff="Desking:frm:courtesyreserve" styleClass="form-control left-text" id="county" value="{!dealer__Deal__c.dealer__County__c}" list="{!TaxZoneCountyList}" html-oninput="setTaxRate();" onchange="setTaxRate();"/>
Here is the class:
public List<String> getTaxZoneCountyList () {
        String[] taxCounties = new String[]{};
        for(dealer__Tax_Zones__c tx : [select Id, dealer__City__c, dealer__County__c, dealer__State__c from dealer__Tax_Zones__c limit 500]) {
            taxCounties.add(tx.dealer__County__c);
        }
        return taxCounties;
}

 
I Stuck at  Manage Transaction Security Policies
In my org i did'nt find create New View 
 
Given Challenge is
User-added image
But in my Org there is now creation of create new view 

i also attaching my org snap pic
User-added image

please guide me if any know

 
I have a visualforce page that, amongst other things, contains 2 fields. One is a State field and the other is a County field. The County field contains a list of all the Counties in a "Tax Zone" custom object.

I am trying to modify the code so that the County list only contains Counties from whatever State has been typed in the State field. There is currently a getter method that runs on page load that adds items in the County list field regardless of the state.

I want to use rerender to accomplish this but I am new to development and a little out of my league here. Can someone please help???

Here is the VF page:
<apex:inputField type="text" html-ff="Desking:frm:county" styleClass="form-control" style="text-transform: uppercase;" id="state" value="{!dealer__Deal__c.State__c}" >
     <apex:actionSupport event="onchange" rerender="county" />             
</apex:inputField>



<apex:inputField type="text" html-ff="Desking:frm:courtesyreserve" styleClass="form-control left-text" id="county" value="{!dealer__Deal__c.dealer__County__c}" list="{!TaxZoneCountyList}" html-oninput="setTaxRate();" onchange="setTaxRate();"/>
Here is the class:
public List<String> getTaxZoneCountyList () {
        String[] taxCounties = new String[]{};
        for(dealer__Tax_Zones__c tx : [select Id, dealer__City__c, dealer__County__c, dealer__State__c from dealer__Tax_Zones__c limit 500]) {
            taxCounties.add(tx.dealer__County__c);
        }
        return taxCounties;
}

 
Hi guys,
i recently completed 100% of the admin beginner trail, but salesforce still didn't add it up to my trail's count on my profile, what should i do? thank you