Tag Archives: Salesforce

.getHeaders().get(‘Referer’) in Safari on iOS

We have a Salesforce Community, and few VF pages inside Lightning templates in it. To get URL parameters inside Apex controller we using: ApexPages.currentPage().getHeaders().get(‘Referer’) , since ApexPages.currentPage().getUrl() returning URL of iframe, not the page URL. However, from iPhone, if we’re using Safari, ApexPages.currentPage().getHeaders() just don’t have Referer. We can’t use JS on page to pass… Read More »

How to get marketing cloud userinstance

Hi I need how to get marketing cloud userinstance through soap api. Iam using below code getting user details but useinstance not getting. could you please tell me how to achieve this requirement. user@sfdc.com test@93 AccountUser true // to enable child accounts email ActiveFlag CreatedDate UserID LastSuccessfulLogin

Can we push the new JSON node in existing JSON in apex?

Need to add New JSON in the existing JSON For example I want to add filters in JSON of filter schema. String str = ‘{“reportMetadata” : {‘ +'”aggregates” : [ “RowCount” ],’ +'”currency” : null,’ +'”detailColumns” : [ “CUST_NAME”, “CTSTESTCOVERAGE__TestCoverage__c.CTSTESTCOVERAGE__Class_coverage__c”, “CTSTESTCOVERAGE__TestCoverage__c.CTSTESTCOVERAGE__Total_number_of_lines__c”, “CTSTESTCOVERAGE__TestCoverage__c.CTSTESTCOVERAGE__Covered_Lines__c”, “CTSTESTCOVERAGE__TestCoverage__c.CTSTESTCOVERAGE__Uncovered_Lines__c” ],’ +'”developerName” : “Test_Run_All_Test_Classes_Result”,’ +'”groupingsAcross” : [ ],’ +'”groupingsDown” : [ ],’… Read More »

Adding white space into Pre-header in Email  &zwnj

Email Templates with White Space – HTML editor Currently not using the standard Pre-header box in an email but instead, have a block on the email template that holds the text for the pre-header. I would like to be able to display a section of white space after the preheader currently this shows the first… Read More »

Apex trigger caused an unexpected exception:ANNOT_INSERT_UPDATE_ACTIVATE_ENTITY,

Hi Members I have a after update trigger that calls a class method. But the update fails with the error: Apex trigger caused an unexpected exception:ANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, trigger TotalAmountGlobalOpportunity on Opportunity (after insert, after update, after undelete) { Opportunity[] Opptys = Trigger.new; //Call class method SumAmountChildOpportunity.CalculateTotalAmount(Opptys); In the class method I do the following but it… Read More »

Help on Cases batch class

I have created the batch class which will store the count in other object with status “New” and “Closed” I have 60 Case records with 25 as “New” status and remaining with “Closed” status when i am running batch of 25 then my count is coming 0 for “New”. because in 3rd batch there is… Read More »

Get Custom Object full Id

I need help with an issue I’m facing. In short, I have created a Custom Object with two Record Types. Then created a tab for it and everything works as expected when creating/editing records. The problems start when I override the New/Edit buttons to redirect to my Custom Visualforce pages. I can’t find a way… Read More »