• Praful_Gupta
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 10
    Replies

I have a query:

If an apex trigger is calling a future method that is making an HTTP REST  callout.
Would the 100 call-out limits apply or not (considering trigger has 200 records in current context )?

I came across the article(will it work for 200 records) : https://www.forcetalks.com/blog/salesforce-rest-api-integration-with-veriphone/

Hi,
We are looking to implement the Middleware/ETL tool for the integration between Salesforce and in-house application and in the stage of assessing between Dell Boomi and Jitterbit Harmony (not considering Mulesoft for pricing reasons).
If you have any experience with either Dell Boomi or Jitterbit Harmony, please suggest:
1) How good is the Transformation capability of the tool ?
2) How good is Error handling, audit, security and system operation features ?
3) Any issues when transferring data around 200-300MB daily ?
4) Vendor Support and how simple to debug the issues?
5) Process orchestration ?
Hi,
I am trying to pass a paramter into live agent deployment code like 
liveagent.init('https://XXXX.salesforceliveagent.com/chat', '572b0000000xxxs&lang=en&country=international_Support_EN', 'xxxxxxxxxxxxx');
passing parameter like "&lang=en&country=international_Support_EN"  works fine in production environment however when im adding parameters in deployement code of sandbox its not working.
Is anyone else also facing same issue and anyone knows a workaround for it ?
Thanks
I am facing a problem related to UI on iOS device, there is custom Visualforce page for live agent chat and it is mobile responsive, I want when keyboard of mobile or tablet popsup, viewport of chat area to be adjusted or decrease accordingly.

I tried to use media query ( with condition like: @media all and (max-height: 450px) height to be reduced) and its works fine for "android devices" however for iOS device screen just scrolled up and thus top chat log not visible until user scrolls up. Is there any work around that screen size decreases when keyboard popsup for iOS devices ?
 
Has anyone else ever run into this problem?

Any thoughts? 
I have created a visualforce page by using visualforce chart component, chart components are working perfect in visualforce but after I created force.com site for that page and opened that page outside Salesforce as site page , page is loading properly but there is "vf-chart.css" which is not loading and showing empty css.
In browser, I clicked inspect element went to sources tab-> apexpages/chart folder -> vf-chart.css and this css is empty because of this chart compont is not highlting properly.
Any help will be appreciated??
I have a question related to sorting of custom text field for visual force

Scenario, there is custom field with label account number as text field but it has data as numbers and I want to display it in visualforce,
example: this text field (Account_Number__c) has numeric values like 1, 19, 35 etc. Visualforce page displays these values as 1, 35 ,19
how can I sort them as 1,19,35 ?

My query look like :
[select id, Name, high_months__c, low_months__c, Account_Number__c from Company_Account__c where Account__c = :accId Order By Account_Number__c DESC];
Above, I want to sort by Account_Number__c which is text field with data as numbers but in visualforce I am not getting sorted data, please help?
I need a trigger where I have 3 objects account, contact, and city and the city has no relationship with any object. The account has a field called City--c. If city--c and city object name is matched, then the only contact should be created
 
I'm getting the following error on Advanced Apex Specialist Superbadge - Step 5.  Any ideas please?
User-added image

Here is the current code segments:

VerifyQuantityOrdered
Public static void VerifyQuantityOrdered(Product2 originalProduct, Product2 updatedProduct, Integer qtyOrdered) {
       	decimal tot = (originalProduct.Quantity_Ordered__c + qtyOrdered);
        
            system.debug('OldVQ ' + originalProduct.Quantity_Ordered__c);
            system.debug('NewVQ ' + updatedProduct.Quantity_Ordered__c);
            system.debug('QTYVQ ' + qtyOrdered);
        
        system.assertEquals(updatedProduct.Quantity_Ordered__c,tot);     
    }
OrderTests
@isTest
private with sharing class OrderTests {

    @testSetup 
    private static void SetupTestData (){    
    	TestDataFactory.InsertTestData(5);   
    } 

    @isTest
    private static void OrderUpdate_UnitTest (){
        Test.startTest();
    	
        List<Order> OrderList = [select id, name, status from order];

        For (Order ordrec : OrderList) {
            OrderItem oirec = [select id, Pricebookentry.product2Id from orderitem where orderid=:ordrec.id];
			Product2 oldprodrec = [SELECT Family,Id,Name,Quantity_Ordered__c,Quantity_Remaining__c 
                            	FROM Product2 where id =: oirec.Pricebookentry.product2Id  limit 1];
            ordrec.status = constants.ACTIVATED_ORDER_STATUS;
            update ordrec;
            OrderItem oirec1 = [select id, Pricebookentry.product2Id from orderitem where orderid=:ordrec.id];
			Product2 newprodrec = [SELECT Family,Id,Name,Quantity_Ordered__c,Quantity_Remaining__c 
                            	FROM Product2 where id =: oirec1.Pricebookentry.product2Id  limit 1]; 
            system.debug('Old ' + oldprodrec.Quantity_Ordered__c);
            system.debug('New ' + newprodrec.Quantity_Ordered__c);
            system.debug('QTY ' + constants.DEFAULT_ROWS);
            TestDataFactory.VerifyQuantityOrdered(oldprodrec,newprodrec,constants.DEFAULT_ROWS);
        }
        Test.stopTest();          
    }
}
Product2Tests
@isTest  (seeAllData=false)
private with sharing class Product2Tests {

    /**
     * @name product2Extension_UnitTest
     * @description UnitTest for product2Extension
    **/
    @isTest
    private static void Product2Extension_UnitTest(){
// Set-up user
        String uniqueUserName = 'standarduser' + DateTime.now().getTime() + '@testorg.com';
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
        User u = new User(Alias = 'standt', Email='standarduser@testorg.com',
        	EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
        	LocaleSidKey='en_US', ProfileId = p.Id, TimeZoneSidKey='America/Los_Angeles', UserName=uniqueUserName);

        System.runAs(u) {
        
// When a user first visits the page, there should be multiple rows displayed on the screen. 
// Assert that the size of the productsToInsert list is equal to the DEFAULT_ROWS constant.
//		Test.StartTest(); 
        	Product2 prod = new Product2(name='Test',isActive=true);
        	ApexPages.StandardController stdc = new ApexPages.StandardController(prod);
        	Product2Extension p2x = new Product2Extension(stdc);        
       		System.assertEquals(Constants.DEFAULT_ROWS, p2x.productsToInsert.size());
//		Test.StopTest();  

// When the Add button is clicked, an additional set of rows should be added, 
// so assert that the size of the productsToInsert ** list is double **DEFAULT_ROWS after the button is clicked once. 
//        Test.StartTest();
        	p2x.addRows();
        	System.assertEquals(Constants.DEFAULT_ROWS * 2, p2x.productsToInsert.size());
//		Test.StopTest();          

// Next, test the Save button. Verify that populated rows are saved and unpopulated rows are not saved. 
// Loop through the rows in the productsToInsert list and populate the values of the first 5 records, 
// and then simulate clicking the Save button. Verify that the button worked by asserting that only 5 products were saved.
		integer x = 0; 
        for (Product2Extension.ProductWrapper PTI : p2x.productsToInsert){
            pti.productrecord.name='TESTPRODUCT ' + x;
            pti.productRecord.IsActive = true;
            pti.productRecord.Initial_Inventory__c = 20;
            pti.productRecord.Family = Constants.PRODUCT_FAMILY[0].getValue();           
            pti.pricebookEntryRecord.UnitPrice = 10;
            
        	x++; if (x==5) {break;}
        }

//        Test.startTest();
        	p2x.save();
//        Test.stopTest();
        List<Product2> createdProducts = [SELECT Id FROM Product2];
        System.assertEquals(5, createdProducts.size());

// plus some more test areas        
        p2x.GetFamilyOptions();
        p2x.GetInventory();

    }
    }
}


 
scenario :   Case is created in Salesforce,  Immediatly this case details be moved to third patry systems ( .net system, java sysstem,.......)
how can i do this ?
example : 
case # 12345 created in salesforce, immediatly case reflected in third party systems like java ,.net or some other systems.
Due to project cost, not going for opiton use third party integration tools like Dell boomi......or any other tools.

please provide any ideas on this requirement 
Thanks 
  • May 18, 2018
  • Like
  • 1
Hi All,

Could anyone help me to write email validation.

Below these Email format should not be included
Invalid email addresses
Abc.example.com (no @ character)
234567890123456789012345678901234567890123456789012345678901734+x@example.com (too long)
john..doe@example.com (double dot before @)
example@localhost (sent from localhost)
john.doe@example..com (double dot after @)
john..doe@example.com

Please help me guys.
​Thanks in advance
Hello All,

Please help me to create a record on Custom Object using javascript button.

1. Whenever i click a button it should pick (accountid,ownerid,CloseDate) from Opportunity record
2. It should create a record with above fields on Custom Object.
===================================================
> The below code that i have written is throwing an error on chrome browser
(faultstring:'soapenv:Client',faultstring:''NaN-NaN-NaNTNaN:NaN:NaN:NaN-NaN:NaN' is not a valid value for the type xsd:date',)
> When i try this in IE it is giving me some other date in internet explorer
> I have tried so many things (parsing,format,toISOString,toLocaleDate..etc..,) but no luck.
===================================================
Code:
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}

var opp = new sforce.SObject("Opportunity");
opp.Account = "{!Opportunity.AccountId}";
opp.OwnerId = "{!Opportunity.OwnerId}";
opp.CloseDate = "{!Opportunity.CloseDate}";
alert(opp.CloseDate);

var ord = new sforce.SObject("Order__c");
ord.Account_Name__c = opp.Account;
ord.Account_Director_Name__c = opp.OwnerId;
if(opp.CloseDate==null || opp.CloseDate == ''){
   ord.Customer_Signature_date__c = null;
} else {
   var temp = new Date(opp.CloseDate);
   ord.Customer_Signature_date__c = temp;
}

new_rec = sforce.connection.create([ord]);
 alert('Opportunity Converted successfully ID : '+new_rec[0].id);
======================================================

Please correct me what is the wrong with my code. Every field is populating except closeDate field.

Thanks in Advance,
Teja
HI 

Can anyone advise how to apply font-size for pageblock title value. 

<apex:outputPanel  id="outputpanel" layout="block">
<apex:pageblock  title="Title"">

Thanks
How do I change the content and footer of the email?
Hi,
I am trying to pass a paramter into live agent deployment code like 
liveagent.init('https://XXXX.salesforceliveagent.com/chat', '572b0000000xxxs&lang=en&country=international_Support_EN', 'xxxxxxxxxxxxx');
passing parameter like "&lang=en&country=international_Support_EN"  works fine in production environment however when im adding parameters in deployement code of sandbox its not working.
Is anyone else also facing same issue and anyone knows a workaround for it ?
Thanks