• SForceBeWithYou
  • NEWBIE
  • 80 Points
  • Member since 2012
  • Principal Technical Architect
  • May The SForce Be With You, Inc.


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 3
    Questions
  • 68
    Replies
Hi,

I am using a Map<Boolean, Idea> . I am trying to adding up values in the map in a for loop. But only the last added values only saved in the map. I can't able to identify it. 
 
listofIdeas = new Map<Boolean, Idea>();
        ideaList = [ SELECT Title,Body,Id,VoteScore,VoteTotal FROM Idea Order By CreatedDate desc ];
        for(Idea ids: ideaList)
        {
            ideaIds.add(ids.Id);
        }
        List<Vote> userVote = [SELECT CreatedById, ParentId FROM Vote WHERE CreatedById = :Userinfo.getUserId() AND ParentId = :ideaIds];
        System.debug('Hi' +userVote);
        for(Idea ideas : ideaList)
        {
            for(Vote votes: userVote)
            {
                if(votes.ParentId == ideas.Id)
                {    
                    isVoted = true;              
                }
                else
                {
                    notVoted = true; 
                }                
            }
            System.debug('Voted'+ ideas.Title + isVoted); 
            if(isVoted == true)
            {
                listofIdeas.put(true,ideas);
            }
            else if(notVoted == true)
            {
                listofIdeas.put(false,ideas);
            }  
        }
        System.debug('Ideas List' + listofIdeas);
I want to compare if the user already voted on particular idea. I am facing problems on comparing it and send it to VF page and based on that I should the promote and demote button.

Thanks,
Vetri
 
Hey dev peeps,

So, I'm writing two custom Lightning components:
1) A navigation menu that fire Application level events when nav items are clicked
2) A form component that listens for navigation events, and dynamically loads different form pages
 
({
    initialLoad : function(component, event) {
        console.log("Entering CustomerApplicationNavigationController.initialLoad");
        var initialDivId = "YourInfo",
            formName = "CreditApp_" + initialDivId;
        this.changeActiveNavItem(component, event, initialDivId);
        console.log(formName);
        console.log("Running CustomerApplicationNavigationHelper.fireNavEvent...");
        this.fireNavEvent(component, event, formName);
    },
    fireNavEvent : function(component, event, formCmpName) {
        console.log("Entering CustomerApplicationNavigationHelper.fireNavEvent...");
        console.log("formCmpName: " + formCmpName);
        //console.log($A);
        var navEvent = $A.get("e.c:CustomerApplicationNavEvent");
        console.log(navEvent);
        navEvent.setParams({"pageToLoad" : formCmpName});
        console.log("navEvent: " + navEvent);
        navEvent.fire();
        console.log("navEvent fired...");
    },
    registerClickHandlers : function(component, event) {
        var navItems = document.getElementById("navItems");
        for (var idxNavItem = 0; idxNavItem < navItems.children.length; idxNavItem++) {
            navItems.children[idxNavItem].addEventListener("click", function (clickEvent) {
                var formName = "CreditApp_" + clickEvent.target.id;
                //console.log(formName);
                console.log("Entering CustomerApplicationNavigationHelper.fireNavEvent...");
                console.log("formName: " + formName);
                //console.log($A);
                var navEvent = $A.get("e.c:CustomerApplicationNavEvent");
                console.log("navEvent: " + navEvent);
                navEvent.setParams({"pageToLoad" : formName});
                console.log("navEvent: " + navEvent);
                navEvent.fire();
                console.log("navEvent fired...");
            });
        }
    },
    changeActiveNavItem : function(component, event, navItemId) {
        console.log("Entering CustomerApplicationNavigationController.changeActiveNavItem");
        console.log(navItemId);
        var navItems = document.getElementById("navItems"),
            activeNavComponent = document.getElementById(navItemId);
        console.log(activeNavComponent);
        console.log(JSON.stringify(navItems.children));
        for (var idxNavItem = 0; idxNavItem < navItems.children.length; idxNavItem++) {
            navItems.children[idxNavItem].classList.add("inactive");
        }
        activeNavComponent.classList.add("active");
    }
})

After running the initial "fireNavEvent" on doInit of the nav component, var navEvent = $A.get("e.c:CustomerApplicationNavEvent"); works fine and loads an event into navEvent:
console.log("navEvent: " + navEvent);

returns:
navEvent: SecureAuraEvent: [object Object]{ key: {"namespace":"c"} }

However, when the "registerClickHandlers" version of this runs, I get this:
console.log("navEvent: " + navEvent);
returns:
navEvent: undefined

Is this a scoping problem?  I'm not including any libraries like jQuery that would mess with the "$" variable.  console.log($A) gives me the JavaScript API object in each context, just not returning an event with $A.get.  How can I even start to debug this?


Thanks,

Nathan

I'm making a call to an external RESTful web service from Apex code via Http, HttpRequest, and HttpResponse classes.

 

Here is my response:

{"response":{"error_id":"SYSTEM","error":"SFDC_STACK_DEPTH is not a valid HTTP header name","error_description":null,"error_code":null,"service":"auth","method":"POST","dbg_info":{"instance":"11.hbapi.sand-08.nym1","slave_hit":false,"db":"master","awesomesauce_cache_used":false,"warnings":[],"time":18.586874008179,"start_microtime":1359518018.7667,"version":"1.13.12.3"}}}

 

It's obvious that it's not liking the request header:

SFDC_STACK_DEPTH: 1

 

 

Any way I can not include this in the request?  Can I change the HTTP version (1.1 instead?)

 

Thanks,

 

Nathan

So, I'm dealing with the largest org instance I've ever come across, and apparently when I do a Schema.getGlobalDescribe() and try to put the key set into a Set<String>, I get "Collection size 1,629 exceeds maximum size of 1,000".

Now, I'm no stranger to getting arounds limits... I've obviously ran into data limi problems in this org, and metadata limits on the Eclipse side, but I'm not quite sure how to get around this one, since the Schema.getGlobalDescribe() method is not a SOQL query... It's a method that returns a Map<String,Schema.SObjectType> , and the limit for a map is 1,000. I know with a large query, you can do something akin to this for an org with 30,000 accounts:
for(List<Account> lstAccts : [SELECT Id, Name FROM Account]){
for(Account a : lstAccts){
a.Name = a.Name + ' some change';
}
update lstAccts;
}

... but the method Scena.getGlobalDescribe() is not a query, it's a method call that returns a Map<String,Schema.SObjectType>. How can I populate a full set (or list of sets) of API names of SObjects in my org if there's more than 1,000?

Here's what I have so far:

Controller:
public class CustomObjectsViewController{
public Map<String,Schema.SObjectType> mapGDescribe{get; set;}
public Set<String> setObjNames{get; set;}

public CustomObjectsViewController(){
this.mapGDescribe = Schema.getGlobalDescribe();
this.setObjNames = mapGDescribe.keySet();
}
}

VisualForce Page:
<apex:page controller="CustomObjectsViewController">
<apex:pageBlock >
<apex:pageBlockTable value="{!setObjNames}" var="objName">
<apex:column value="{!objName}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

Error when loading VFpage:
Collection size 1,629 exceeds maximum size of 1,000

Note:
At the end of the day... I'm really trying to implement a List View of custom objects.
All I want is a list view "Unmanaged Custom Objects" like I have for classes, triggers, components, and VFpages.
Is there an idea like that I can vote for?

Any help is GREATLY appreciated.


Thanks,

Nathan Pepper
SalesForce.com Developer
YouTube: www.youtube.com/MayTheSForceBWithYou
Twitter: @SForceBeWithYou
Below is my code:
import { LightningElement } from 'lwc';
import { loadScript,loadStyle} from "lightning/platformResourceLoader";
import HIGHCHARTS from "@salesforce/resourceUrl/highcharts";
import HIGHMAPS from "@salesforce/resourceUrl/highmaps";
import DATA from "@salesforce/resourceUrl/data";
import DRILLDOWN from "@salesforce/resourceUrl/drilldown";
import EXPORTING from "@salesforce/resourceUrl/exporting";
import OFFLINE from "@salesforce/resourceUrl/offlineexporting";
import USALL from "@salesforce/resourceUrl/usall";
import FONTAWESOME from "@salesforce/resourceUrl/fontawesome";
export default class MAPROJECT extends LightningElement {
    
    connectedCallback() {
        
        Promise.all([
            loadScript(this, HIGHCHARTS)
                .then(() => console.log("highcharts loaded"))
                .catch(error => console.log("Error in loading highcharts"+ error)),
            loadStyle(this, FONTAWESOME)
                .then(() => console.log("font loaded"))
                .catch(error => console.log("Error in loading font" + error)),
            
            loadScript(this, DATA)
                .then(() => console.log("data loaded"))
                .catch(error => console.log("Error in loading data" + error)),
            
            loadScript(this, DRILLDOWN)
                .then(() => console.log("drilldown loaded"))
                .catch(error => console.log("Error in loading drilldown"+ error)),
                
            loadScript(this, EXPORTING)
                .then(() => console.log("exporting loaded"))
                .catch(error => console.log("Error in loading exporting"+ error)),
                    
            
            loadScript(this, OFFLINE)
                .then(() => console.log("offlineexporting loaded"))
                .catch(error => console.log("Error in loading offlineexporting"+ error)),
            
            loadScript(this, USALL)     
                .then(() => console.log("usall loaded"))
                .catch(error => console.log("Error in loading usall"+ error)),

            loadScript(this, HIGHMAPS)
                .then(() => console.log("highmaps loaded"))
                .catch(error => console.log("Error in loading highmaps"+ error))
        ])
        .then(() =>{
            this.runHighcharts();
        })
        .catch(error => {
            window.console.log("The error is: " + error);
        });
    }

Here is the image of uploaded static resources:
Static resources

Here is the Error in console:

Error

Thanks..
Hi Team,
I need help there is one requirement on button click I need to generate ppt that is happening from vf page attribute content type but there are lot of sections and we need to decide which section should go to slide 1 of ppt which section section go to slide 2 and so on
How to do slide break.
Hi guys, 

I have been trying to third party js file called oidc-client.js from static resource and unfortunately will not load the script. However, when I try to load jquery js file, it will load. I can see in the network tab of Google chrome developer tools that oidc js was loaded successfully. 

There's no error stack other than undefined. 

I downloaded the file from https://github.com/IdentityModel/oidc-client-js

​​​​​​Any ideas why It won't loadscript?? 

Sorry I am not leaving any code snippet because I am raising this issue using my phone. 

Many thanks
Asad
​​​​​​
​​​
Hi Folks,

I am building a LWC to load external JS script file in LWC. However whenever loadScript function is executing it is failing to load and there is not error received.

LWC
import { LightningElement, track  } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import BrandfolderJS from '@salesforce/resourceUrl/BrandfolderJS';

export default class brandFolderLink extends LightningElement {
	
    @track blnBrandfolderJSInitialized = false;
    
    renderedCallback() {

        if (this.blnBrandfolderJSInitialized) {
            return;
        }
        this.blnBrandfolderJSInitialized = true;

        loadScript(this, BrandfolderJS)
        .then(() => {
            alert('success.......');
        })
        .catch(error => {
            alert('failed.....'+error);
        });
    }
	
}

JS file from Static Resource - Brandfolder JS (https://cdn.brandfolder.com/bf.min.js)
I have created JS file as static resource (BrandfolderJS) and using it in LWC.

LWC is added to App Builder Page/Home Page and trying to load, however it is going to catch block in loadScript method without any error. Error variable is undefined.

Can you please help?

Thank you,
Jigar Lakhani

Dear Team ,

Greetings !!!

In my Salesforce org (App Launcher) Analytics Studio is not available . What can i do in order Analytics Studio will appear in app launcher.

Thanks & Regards
Sachin Bhalerao
I was working through the 'Lightning Web Components Basics' trailhead unit and was successfully able to push the E-bikes demo app and components to my organization. As per the trailhead instructions, I was using the salesforce CLI command:
sfdx force:source:deploy -p force-app -u <username>

This worked initially, but after making the prescribed changes to some web components for the unit, the deploy command now fails with the error: 
The component must implement at least one of lightning__AppPage interface.
Even if I checkout the e-bike demo app code clean from GitHub, it still fails with the same error.
Is there something wrong with my CLI configuration? Or organization configuration?
 
Hi All,
i have node.js installed in my pcversion is v.8.12,0.
i am trying to install salesforce cli by using npm install --global sfdx-cli command.
the install seems to be successful as its extracting all the metadata.However after installation while running the SFDX command its not working.Also i was not able to find any folder created as a result of cli installation.
Can anybody help me here.

Thanks,
Bhaskar
7.Challenge Not yet complete... here's what's wrong: 
Ensure that you implement all the pagination methods using the corresponding StandardSetController methods.
/**
 * @name OrderExtension
 * @description This class is provided for you to facilitate the Super Badge
**/
public class OrderExtension {

    public Order orderRecord {get;set;}
    public List<OrderItem> orderItemList {get;set;}
    public String selectedFamily {get;set;}
    public List<chartHelper.chartData> pieData {get;set;}
    public Decimal total {get;set;}
  
    public Map<Id,OrderItem> orderItemMap;
    ApexPages.StandardSetController standardSetController;

    public OrderExtension(ApexPages.StandardController standardController){
        orderRecord = (Order)standardController.getRecord();
        orderItemMap = new Map<id,OrderItem>();
        if ( orderRecord.Id != null ){
            orderRecord = queryOrderRecord(orderRecord.Id);
        }
        orderItemList = new List<OrderItem>();
        OrderItemList.addAll(orderRecord.OrderItems);
        set<Id> p2ids = new set<Id>();
        for(OrderItem oitem : OrderItemList){
            p2ids.add(oitem.PriceBookEntryId);
        }
        List<PriceBookEntry> p2List = new List<PriceBookEntry>();
        if(p2Ids.size()>0){
            p2List = [select id from PriceBookEntry where id IN: p2Ids];
        }
        standardSetController= new ApexPages.StandardSetController(p2List);
        standardSetController.setPageSize(Constants.DEFAULT_ROWS);
     
    }
    

    public void resetstandardSetController() {
        String query = 'SELECT Name, Product2.Family, Product2.Name, Product2Id, UnitPrice, Product2.Quantity_Remaining__c'
                     + '  FROM PricebookEntry WHERE IsActive = TRUE';

        if (selectedFamily != null && selectedFamily != Constants.SELECT_ONE) {
            query += ' AND Product2.Family = \'' + selectedFamily + '\'';
        }
        query += ' ORDER BY Name';

        standardSetController= new ApexPages.StandardSetController(Database.getQueryLocator(query));
        if(StandardSetController== null){
            StandardSetController= new ApexPages.StandardSetController(Database.getQueryLocator([SELECT Product2Id, Product2.Family, Product2.Name, 
Product2.Quantity_Remaining__c, UnitPrice FROM PricebookEntry ]));
            StandardSetController.setPageSize(Constants.DEFAULT_ROWS);
        }
        
    }

    //ToDo: Implement your own method to populate orderItemList
    //  that you will call after pagination and/or family selection
   public void GetOrderItems() {
        orderItemList = new List<OrderItem>();
        for (SObject obj : standardSetController.getRecords()) {
            PricebookEntry pbe = (PricebookEntry)obj;

            if (orderItemMap.containsKey(pbe.Product2Id)) {
                orderItemList.add(orderItemMap.get(pbe.Product2Id));
            } else {
                orderItemList.add(new OrderItem(
                    PricebookEntryId=pbe.Id,
                    Product2Id=pbe.Product2Id,
                    UnitPrice=pbe.UnitPrice,
                    Quantity=0,
                    Product2=pbe.Product2
                ));
            }
        }
    }


    /**
     * @name OnFieldChange
     * @description
    **/
    public void onFieldChange(){
        //ToDo: Implement logic to store the values changed on the page
        for (OrderItem oi : orderItemList) {
            orderItemMap.put(oi.PricebookEntryId, oi);
        }

        //      and populate pieData
        pieData = null;
        total = 0;
        for (OrderItem oi : orderItemMap.values()) {
            if (oi.Quantity > 0) {
                if (null == pieData) {
                    pieData = new List<chartHelper.ChartData>();
                }
                pieData.add(new chartHelper.ChartData(oi.Product2.Name, oi.Quantity * oi.UnitPrice));
                //      and populate total
                total += oi.UnitPrice * oi.Quantity;
            }

        }

    }

    /**
     * @name SelectFamily
     * @description
    **/
    public void selectFamily(){
        //ToDo: Implement logic to filter based on the selected product family
        resetstandardSetController();
        GetOrderItems();
    }

    /**
     * @name Save
     * @description
    **/
    public void save(){
        //ToDo: Implement logic to save the Order and populated OrderItems
        System.Savepoint sp = Database.setSavepoint();
        try {
            if (null == orderRecord.Pricebook2Id) {
                orderRecord.Pricebook2Id = Constants.STANDARD_PRICEBOOK_ID;
            }
            upsert orderRecord;

            List<OrderItem> orderItemsToUpsert = new List<OrderItem>();
            List<OrderItem> orderItemsToDelete = new List<OrderItem>();
            system.debug('@@@@@@@@@@@@@@@#######'+orderItemMap.values());
            for (OrderItem oi : orderItemMap.values()) {
                if (oi.Quantity > 0) {
                    if (null == oi.OrderId) {
                        oi.OrderId = orderRecord.Id;
                    }
                    orderItemsToUpsert.add(oi);
                } else if (oi.Id != null) {
                    orderItemsToDelete.add(oi);
                }
            }
            if(orderItemsToUpsert.size()>0)
            upsert orderItemsToUpsert;
            if(orderItemsToDelete.size()>0)
            delete orderItemsToDelete;
        } catch (Exception e) {
            Database.rollback(sp);
            apexPages.addMessage(new ApexPages.message(ApexPages.Severity.INFO,Constants.ERROR_MESSAGE));
        }
    }


    /**
     * @name First
     * @description
    **/
    public void First(){      
       standardSetController.first();
       GetOrderItems();
    }

    /**
     * @name Next
     * @description
    **/
    public void Next(){   
       standardSetController.next();
        GetOrderItems();
    }

    /**
     * @name Previous
     * @description
    **/
    public void Previous(){      
        standardSetController.previous();
        GetOrderItems();
    }

    /**
     * @name Last
     * @description
    **/
    public void Last(){
        standardSetController.last();
        GetOrderItems();
    }
  /**
     * @name GetHasPrevious
     * @description
    **/
   public Boolean GetHasPrevious(){
        return standardSetController.gethasprevious();
    }

    /**
     * @name GetHasNext
     * @description
    **/
   public Boolean GetHasNext(){
        return standardSetController.gethasnext();
    }

    /**
     * @name GetTotalPages
     * @description
    **/
  public Integer GetTotalPages(){
        Integer totalPages = (Integer)Math.ceil(standardSetController.getResultSize() / (Decimal)Constants.DEFAULT_ROWS);
        System.debug('############ totalPages: ' + totalPages);
        return totalPages;
    }

    /**
    * @name GetPageNumber
     * @description
    **/
    public Integer GetPageNumber(){
        return standardSetController.getpagenumber();
    }

    /**
     * @name GetFamilyOptions
     * @description
    **/
    public List<SelectOption> GetFamilyOptions() {
        List<SelectOption> options = new List<SelectOption>{
            new SelectOption(Constants.SELECT_ONE, Constants.SELECT_ONE)
        };

        for (Schema.PicklistEntry ple : Constants.PRODUCT_FAMILY) {
            options.add(new SelectOption(ple.getValue(), ple.getLabel()));
        }
        return options;
    }
    

    /**
     * @name QueryOrderRecord
     * @description
    **/
    public static Order QueryOrderRecord(Id orderId){
     return [
        SELECT Id, AccountId, EffectiveDate, Name, Status, Pricebook2Id,
                (
                    SELECT Id, OrderId, Quantity, UnitPrice, PricebookEntryId, Product2Id,
                         Product2.Name, Product2.Family, Product2.Quantity_Remaining__c
                    FROM OrderItems where PricebookEntry.isActive = true
                )
            FROM Order WHERE Id = :orderId
            ];
    }

}
Hi, 
I just can't seem to get pass stage 10, as I keep getting, the below error:
"The View Lightning Campaign Influence Report link on the Campaign object must use a relative URL and dynamic filter values."
I have tried with different trail orgs and same issue persists.  Has anyone tried this challenge recently and do you have this issue?

The link in the button I have is "/one/one.app#/sObject/00O0N000004ti60/view?fv0={!Campaign.Id}" - the ID of the report is correct and when clicked from campaign it filters correctly.
Screenshot:
Campaign report link

 
Hi all,

I'm getting an error while verifying step 7:
  • Challenge Not yet complete... here's what's wrong:  Ensure that you implement all the pagination methods using the corresponding StandardSetController methods.
I implemented the class using the StandardSetController methods but it doesn't work.

Any advice or suggestion?
Thank you.
I created a new wave developer org to complete the Build and Administer Analytics trail, however when I log into the new org there the Analytics App isn't there. What am I missing?
I'm getting this error:
User-added image
And I don't have a clue why, any insights/help?  The xml is below with everything it says to check being, to my knowledge, correct.  The review does work, if I enter one and press the submit button it does save and change the tab.
 
    <aura:attribute name="review" type="BoatReview__c" access="private" />
    <aura:attribute name="boatReview" type="BoatReview__c" access="private" />
    <aura:attribute name="recordError" type="String" access="private" />
    
    <force:recordData aura:id="service"
                      layoutType="FULL"
                      fields="Id,Name,Comment__c,Boat__c"
                      mode="EDIT"
                      targetRecord="{!v.review}"
                      targetFields="{!v.boatReview}"
                      targetError="{!v.recordError}" />
    
    <lightning:layout verticalAlign="start" multipleRows="true">
        <Lightning:layoutItem flexibility="auto" padding="around-small">

            <lightning:input name="reviewtitle" label="Title" value="{!v.boatReview.Name}" />

        </Lightning:layoutItem>
        <Lightning:layoutItem flexibility="auto" padding="around-small">
            <label>Description</label>
            <lightning:inputRichText aura:id="reviewcomment" value="{!v.boatReview.Comment__c}" />
        </Lightning:layoutItem>
        <Lightning:layoutItem flexibility="auto" padding="around-small">
            &nbsp;rating&nbsp;
        </Lightning:layoutItem>
        <Lightning:layoutItem flexibility="auto" padding="around-small">
            <lightning:button iconName="utility:save" onclick="{!c.onSave}" label="Submit"/>
        </Lightning:layoutItem>
    </lightning:layout>



 

Hi all, I am so close to finishing this process automation badge but am stuck in one area in Step 7.

I've built out my process builder as follows

User-added image
User-added image
User-added image

And my date formula as follows
 

Case(MOD(Date__c-DATE(1900,1,7),7),0,"Sunday",1,"Monday",2,"Tuesday",3,"Wednesday",4,"Thursday",5, "Friday",6,"Saturday", "")
 



Challenge Not yet complete... here's what's wrong:  The Robot Setup Day of the Week formula does not seem to be working properly. The Day of the Week should not fall on Saturday or Sunday. 

It works nicely but doesn't seem to pass, what could be up.
 

I have a hybrid local app running with Mobile SDK 5.1.  Authentication works fine.  Selecting data works fine.  But when I try to update a record with force.update (using the new syntax with the Id in the object, not as a parameter), I'm getting a very generic 400 error.  All the obvious things look fine -- security, JSON format, etc.  I'm not so much looking for suggestions about the root cause, but could use some advice about how to get more information on the error.  JSON.stringify(error) only returns the URL constructed from the path and fields, and "error 400".  Any ideas about how to dig deeper?
I am calling tooling api from my Queueable apex to get information of flow object from my org and scheduling it on daily basis. Now my problem is when I run my code from anonymous window with Authorization header set to 'Bearer '+Userinfo.sessionId(), It works fine. But when i schedule it, it returns error saying :"Session expired or invalid","errorCode":"INVALID_SESSION_ID". I think the reason is scheduler runs in system context and in that case Userinfo.sessionId() is returned as null. So is there any way to make tooling api callouts from scheduler or Queueable? Here is my code-
String endpoint = 'https://lightningwarrior-dev-ed.my.salesforce.com/services/data/v37.0/tooling/query?q=Select+Id,processtype,Description,LastModifiedDate,MasterLabel,Status,LastModifiedById,VersionNumber+From+Flow';

HttpRequest req = new HttpRequest();
req.setEndpoint(endpoint);
req.setMethod('GET'); 
req.setHeader('Content-Type', 'application/json');
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());

Http httpreq = new Http();
HttpResponse res = httpreq.send(req);
String reqresponse = res.getBody();
system.debug('dt'+reqresponse);
jsonHelperClass jsonres =  new jsonHelperClass();
jsonres = (jsonHelperClass)JSON.deserialize(reqresponse ,     jsonHelperClass.Class);
public List<RecordWrapper> ListrecordsWrap=new List<RecordWrapper>();
ListrecordsWrap=jsonres.records;
system.debug('jsonres'+ListrecordsWrap[0].MasterLabel);
public class jsonHelperClass
{
    public List<RecordWrapper> records;
    public jsonHelperClass()
    {

    }
}
public class RecordWrapper
{
    Public String Id;
    Public String ProcessType;
    Public String Description;
    Public String MasterLabel;
    Public String Status;
    Public Integer VersionNumber;
    public Id LastModifiedById;
    public Datetime LastModifiedDate;
    public RecordWrapper()
    {
    }
}
Thanks.
 
Hi All,

I'm deploying Account and Contact layouts to production using Eclipse Ide. While validating i'm facing issue like  "ActionId specified was invalid for ActionType QuickAction". Please let me know how to resolve the issue.

Thanks
Greetings everyone,

I recently changed all my triggers to classes and then created a main trigger for each object that calls the classes for each respective object.

Anywho, my opportunity trigger calls quite a few classes. The issue is that if I don't add a recursion check, I can't deploy the trigger due to the SOQL query limit being broken. But if I do add the recursion check, only the Before triggers work. Not the After triggers.


Here is the trigger (with the recursion call up top):

trigger MainTriggerOpportunity on Opportunity (before insert, before update, after insert, after update) {
   
    if(checkRecursive.runOnce()){
   
    if(trigger.isBefore){
        if(trigger.isInsert){
            ClassOppIndustry updater = new ClassOppIndustry();
            updater.updateOppIndustry(trigger.new);
           
            ClassRenewalDate updater1 = new ClassRenewalDate();
            updater1.updateRenewalDate(trigger.new);
        }
        if(trigger.isUpdate){
            ClassOppIndustry updater = new ClassOppIndustry();
            updater.updateOppIndustry(trigger.new);
           
            ClassRenewalDate updater1 = new ClassRenewalDate();
            updater1.updateRenewalDate(trigger.new);
        }
    }
   
    if(trigger.isAfter){
        if(trigger.isInsert){
            ClassRenewalProcess updater = new ClassRenewalProcess();
            updater.updateRenewalStatus(Trigger.new);
           
            ClassOppBrandCreate updater1 = new ClassOppBrandCreate();
            updater1.addBrand(trigger.new);
        }
        if(trigger.isUpdate){
            ClassRenewalProcess updater = new ClassRenewalProcess();
            updater.updateRenewalStatus(Trigger.new);
           
            ClassOppBrandCreate updater1 = new ClassOppBrandCreate();
            updater1.addBrand(trigger.new);
           
            ClassChatterAlerts updater2 = new ClassChatterAlerts();
            updater2.addChatterAlert(Trigger.new,Trigger.oldMap);
        }
    }
}
   
}




Here is the recursion check class:

public Class checkRecursive{
   
    private static boolean run = true;
   
    public static boolean runOnce(){
       
    if(run){
     run=false;
     return true;  
    }
    else{
        return run;
    }
       
    }
}



Perhaps I have to allow the trigger to run twice? I'm a newb, so any help would be much appreciated!

Thanks,
Greg

I am trying to prepare a zip file to import new articles into my org/sandbox but having trouble with mapping some key rich text area fields such as solution__c and Description__c. When I add them to the csv file that I am using in the zip file. I get the following error: "This value [Description] in the header for column 6 cannot be mapped (check both the header and its matching FLS).
[MESSAGE 4/16/2013 8:34 PM] -- Import Failed --" I get the same error for both fields and some other standard fields such as publishstatus. I checked the field level security including all the required knowledge permissions and everything looks fine to me. Does anyone know what I am doing wrong?

I am currently thinking of ways to connect to arbitrary Force.com orgs and let them share and receive data bigger than 10mb.

I read the SOAP Webservices have many restrictions regarding size of the transmitted data and other limits.

I have used the Bulk API from Java to upload big amount of data and would like to do the same directly from within the plattform.

 

Has anyone done this already and can share experiences?

Is this possible at all?

Or is this a bad idea and better ways to do this exist?

 

I would love to hear from you.

 

Best regards,

 

Robert

Tried doing a callout from an execute method in a queueable class and go the @future error -
Callout not allowed from this future method. Please enable callout by annotating the future method. eg: @Future(callout=true)
07:13:51.752 (8701449752265601)|SYSTEM_METHOD_EXIT|[1263]|System.Http.send(ANY)
Is there a way to annotate the execute with "(callout=true)".

I sounds like what i want to do may be doable if there's just some syntax to get the annotation.

 

I can get the apex log infirmation from apexlog object

 

SELECT Application, LastModifiedDate, DurationMilliseconds, Location, Id, LogLength, LogUserId, Operation, Request, StartTime, Status, SystemModstamp FROM ApexLog

 

I dont see a column where I can get the details about the log , the information that you see when you click on View link in debug log screen against each debug log item.

 

thanks