• R T 40
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi Guys,
 am trying to delete some accounts and contact in my sandbox org using data loader, Code in dev console or by delete button but I am getting An unknown exception has occurred error.
Do you have any idea why I am getting this error, any workaround to fix this error?
I am logged in as Sys Admin Profile UserButton errorDataloader Error fileDev Console Error
Thanks,
Rahul
  • September 20, 2021
  • Like
  • 0
Hi
I have created the Integration but my endpoint giving me an Invalid URI exception in the callout
 
System.HttpRequest[Endpoint=callout:CNI7_Integration/v1/Products?where=styleCode='AR-DISCOUNT'OR styleCode='ARL-STAND'OR styleCode='D-DISCOUNT'OR styleCode='AR-DISCOUNT'OR styleCode='ARL-STAND'OR styleCode='ABC' , Method=GET]

This is my request. The same request is working in POSTMAN
Do you have any idea what is missing in the above request?
//Product from CIN7
            String criteria = '?where=';
            for(Order Obj : orderList){
                for(OrderItem oi : Obj.OrderItems){
                    criteria +='styleCode=\''+oi.Product2.ProductCode+'\'OR ';                        
                    if(! productCodeMap.containsKey(oi.Product2.ProductCode)){
                        productCodeMap.put(oi.Product2.ProductCode,'');
                    }
                    if(! prodMissing.containsKey(oi.Product2.ProductCode)){
                        prodMissing.put(oi.Product2.ProductCode,oi);
                    }
                }
            }
            criteria +='styleCode=\'ABC\' ';        
            //Get Products from CIN7
            HttpRequest reqProd = new HttpRequest();
            String url ='callout:CNI7_Integration/v1/Products'+criteria;
            reqProd.setEndpoint(url);
            reqProd.setMethod('GET');
            Http httpProd = new Http();
            System.debug('reqProd '+reqProd);
            HTTPResponse resProd = httpProd.send(reqProd);

Thanks,
Rahul
 
  • September 01, 2021
  • Like
  • 0