• Rick Roll
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies
I have a batch class which we use to save data from csv to different objects. In the batch.execute, I put a condition to check if a data to be inserted meets the data type of the field its going to save. It returns a value (true or false). My problem is how do I jump from batch.execute to batch.finish if the condition returns false to prevent from inserting all other data.

How do I jump from Batch.Execute to Batch.Finish?​
Good Day Everyone !
I have a visualforce page where it lists all the contents of the csv in column 1 (CSV Field)​ and select you can select values for column 2 and 3.
User-added image
My problem is that I can't get the saved data for the last value  ( A Field )​ of the csv file even though I can query it with workbench.
User-added image
Can anyone please share any ideas and experiences on why this happens and how to solve this?​
Hello Guys !!!
After I clicked Edit from my visualforce page, I get redirected to my next page that contains a dynamic selectlist and its url containing an id
ex. https://salesforce_instance/apex/MySecondPage?id=001D000000IRt53

my problem is I want to add that dynamic ID (in this case its "001D000000IRt53" ) in my dynamic selectlist as default selected value
How to code this?
 
Hello everyone.
I have a pageblocktable with 3 rows that are dynamically produced from an object Sample__c
As you can see Column3 contains a selectlist with values from Colu1__c which is also listed on column 2 of the table
User-added image
My problem is when I load the page, the values on the picklist are all set to --Select-- but I wanted each of them to automatically choose its corresponding column 2 value (as selected)as default when I load the page.
ex. if the column 2 of the table has Very Good, its corresponding selectlist column should make Very Good as selected value

Can someone please tell me how to do this?
 
I have this table

Platform        Status        Action
 
Platform1       OK           Setup | Edit
Platform2       NA           Setup | Edit
Platform3       OK           Setup | Edit

I want to remove " Setup | " when Status row is OK, else default.
How do I apply this?

here is my code for the table
<apex:pageBlock >
                    <apex:pageBlockTable value="{!platforms}" var="field" >
                        <apex:column headerValue="PLATFORM" value="{!field.Name}"/>
                        <apex:column headerValue="STATUS" value="{!field.Status__c}"/>
                        <apex:column headerValue="ACTION">
                                <apex:commandLink value="Setup" action="{!setup}"/>
                                <apex:outputText >&nbsp;&nbsp;|&nbsp;&nbsp;</apex:outputText>
                                <apex:commandLink value="Edit" action="{!defedit}">
                                </apex:commandlink>
                        </apex:column>
                        <apex:column />
                    </apex:pageBlockTable> 
                </apex:pageBlock>


Thanks!
User-added image
Hi everyone!
I have an object Pattern__c with 3 fields.
I want to retrieve the records from Pattern Name(Name) into a selectlist with no duplicates like shown above (I only made it with html).
After choosing the value of the picklist and clicking the button, the pageblocktable should only show the categories under that Pattern Name.(mine shows all at the moment)
ex. selecting Pattern A should only show 3 rows in the pageblocktable
heres what I did:
Page
<apex:page sidebar="false" controller="GetPattern">
  <apex:stylesheet value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"/>
   <apex:includeScript value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" />
  <div class="row">
       <div class="col-md-4">
          <apex:pageBlock title="Pattern">
            <apex:form>
            <select>
                <option disabled="true">Select Pattern</option>
                <option>Pattern A</option>
                <option>Pattern B</option>
                <option>Pattern C</option>
            </select>
            <input type="button" value="Process"/>
            </apex:form>
         </apex:pageBlock>         
       </div>
       <div class="col-md-8">
         <apex:pageBlock title="Pattern Summary">
            <apex:pageBlockTable value="{!categorylist}" var="cat">
               <apex:column headerValue="Category A" value="{!cat.CategoryA__c}"/>
               <apex:column headerValue="Category B" value="{!cat.CategoryB__c}"/>
            </apex:pageBlockTable>
         </apex:pageBlock>         
       </div>
   </div>
</apex:page>
class
public class GetPattern{
    public List<Pattern__c> categorylist {get; set;}
    public GetPattern()
    {
        this.GetRecords();
    }
    public void GetRecords()
    {
        categorylist = [select Name,CategoryA__c,CategoryB__C from Pattern__c];
    }
}
How do I do these things?
 
Good Day Everyone !
I have a visualforce page where it lists all the contents of the csv in column 1 (CSV Field)​ and select you can select values for column 2 and 3.
User-added image
My problem is that I can't get the saved data for the last value  ( A Field )​ of the csv file even though I can query it with workbench.
User-added image
Can anyone please share any ideas and experiences on why this happens and how to solve this?​
User-added image
Hi everyone!
I have an object Pattern__c with 3 fields.
I want to retrieve the records from Pattern Name(Name) into a selectlist with no duplicates like shown above (I only made it with html).
After choosing the value of the picklist and clicking the button, the pageblocktable should only show the categories under that Pattern Name.(mine shows all at the moment)
ex. selecting Pattern A should only show 3 rows in the pageblocktable
heres what I did:
Page
<apex:page sidebar="false" controller="GetPattern">
  <apex:stylesheet value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"/>
   <apex:includeScript value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" />
  <div class="row">
       <div class="col-md-4">
          <apex:pageBlock title="Pattern">
            <apex:form>
            <select>
                <option disabled="true">Select Pattern</option>
                <option>Pattern A</option>
                <option>Pattern B</option>
                <option>Pattern C</option>
            </select>
            <input type="button" value="Process"/>
            </apex:form>
         </apex:pageBlock>         
       </div>
       <div class="col-md-8">
         <apex:pageBlock title="Pattern Summary">
            <apex:pageBlockTable value="{!categorylist}" var="cat">
               <apex:column headerValue="Category A" value="{!cat.CategoryA__c}"/>
               <apex:column headerValue="Category B" value="{!cat.CategoryB__c}"/>
            </apex:pageBlockTable>
         </apex:pageBlock>         
       </div>
   </div>
</apex:page>
class
public class GetPattern{
    public List<Pattern__c> categorylist {get; set;}
    public GetPattern()
    {
        this.GetRecords();
    }
    public void GetRecords()
    {
        categorylist = [select Name,CategoryA__c,CategoryB__C from Pattern__c];
    }
}
How do I do these things?