• Vishnu Vihar
  • -1 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 6

When one of our service user is activating customer user(B2B End user) via user detail page. Customer user is not receving Welcome Email on their email address. It happens only to one service user. Other users are able to activate external users and they are able to receive welcome email. I have checked Service user profile, permission sets ass well as external user email address but don't understand why they aren't reaching out to external user. Any B2B Commerce setup guys are here for help?
Getting this error when I try to add my Towermaps to a new app builder page:
User-added image

Here are the codes I have based on the trailhead exercise:

public inherited sharing class TowerMapUtilClass {
     public static List<sObject> queryObjects(String theObject, List<String> theFields, String theFilter, String sortField, String sortOrder) {
          String theQuery = 'SELECT ' + string.join(theFields, ',');
          theQuery += ' FROM ' + theObject;
          if(!String.isEmpty(theFilter)) {
               theQuery += ' WHERE ' + theFilter;
          if(!String.isEmpty(sortField)) {
               theQuery += ' ORDER BY ' + sortField;
               if(!String.isEmpty(sortOrder)) {
                    theQuery += ' ' + sortOrder;
          return database.query(theQuery);

public inherited sharing class TowerMapControllerClass {
     public static List<Tower__c> getAllTowers() {
          String theObject = 'Tower__c';
          List<String> theFields = new List<String>{'Id', 'Name', 'State__r.Name', 'Tower_Location__Latitude__s', 'Tower_Location__Longitude__s'};
          String theFilter = '';
          String sortField = 'Name';
          String sortOrder = 'ASC';
          List<Tower__c> allTowers = TowerMapUtilClass.queryObjects(theObject, theFields, theFilter, sortField, sortOrder);
          return allTowers;
<aura:component implements="flexipage:availableForAllPageTypes" controller="TowerMapControllerClass" access="global" >
     <aura:attribute name="mapMarkers" type="Object" access="PRIVATE" />
     <aura:attribute name="markersTitle" type="String" access="PRIVATE" />
     <aura:handler name="init" value="{!this}" action="{!c.handleInit}"/>
     <aura:if isTrue="{!!empty(v.mapMarkers)}" >
          <lightning:map mapMarkers="{!v.mapMarkers}" markersTitle="{!v.markersTitle}" zoomLevel="5"/>

Towermap Controller:
     handleInit: function (component, event, helper) {
          helper.initHelper(component, event, helper);
Towermap Helper:
     initHelper : function(component, event, helper) {
          helper.utilSetMarkers(component, event, helper);
     utilSetMarkers : function(component, event, helper) {
          let action = component.get("c.getAllTowers");
          action.setCallback(this, function(response) {
               const data = response.getReturnValue();
               const dataSize = data.length;
               let markers = [];
               for(let i=0; i < dataSize; i += 1) {
                    const Tower = data[i];
                        'location': {
                             'Latitude' : Tower.Tower_Location__Latitude__s,
                             'Longitude' : Tower.Tower_Location__Longitude__s
                        'icon': 'utility:Tower',
                        'title' : Tower.Name,
                        'description' : Tower.Name + ' Tower Location at ' + Tower.State__r.Name
               component.set('v.markersTitle', 'Out and About Communications Tower Locations');
               component.set('v.mapMarkers', markers);

I also created the cutom object Tower.

Anyone know where my break is?


Hello All,
I'm trying to install B2b commerce in developer org. Anyone had a success with this.
I have a requirement where i need to merge all accounts if a particular field vendor_code__c value is duplicate.There is also a condition that the account of record type 'A' needs to be the master and record type 'B' needs to be the dupliacte. I have written  a batch code for this fucntionality.I am not getting any errors but the accounts are not getting merged either. Kindly help!

global class BatchVendorAccountMerge implements database.Batchable<sobject>   {

    global  database.QueryLocator start(Database.BatchableContext ctx){
        string query;
        query = 'SELECT Id, Type, RecordTypeId,Record_Type__c, Name, MasterRecordId, Vendor_Code__c FROM Account';
        return database.getQuerylocator(query);
    global void execute(Database.BatchableContext BC, list<account> scope ){
     //create a map with vendor code and its account        
        //to store all unique vendor codes
        Set<string> strVC = new Set<string>();
         //create a map with vendor code and its account        
        map<string,list<account>> vendoraccmap = new map<string,list<account>>();
        for(account a:scope){
            if(vendoraccmap.containskey(a.Vendor_Code__c)) {
            } else {
                vendoraccmap.put(a.Vendor_Code__c, new List<account> {a});
       system.debug('****Unique vendor codes***'+strVC);
        system.debug('****vendor and acc map***'+vendoraccmap);
       Account masteracc = new account();
        list<account> dupacc = new list<account>();
        for(string v:vendoraccmap.keySet()){
            if(vendoraccmap.get(v).size() > 1)               
                for(Account a:vendoraccmap.get(v)) 
                    if(a.Record_Type__c == 'A'){
                     else  if (a.Record_Type__c == 'B') {
                system.debug('***Master account***'+masteracc);
                system.debug('***Duplicate accounts***'+dupacc);
        Database.MergeResult[] results = Database.merge(masteracc, dupacc, false);
     system.debug('***results merged**'+results);
       for(Database.MergeResult res : results) {
          if (res.isSuccess()) {
              System.debug('Master record ID: ' + res.getId());
        System.assertEquals(masteracc.Id, res.getId());               
        List<Id> mergedIds = res.getMergedRecordIds();
        System.debug('IDs of merged records: ' + mergedIds);                
    else {
        for(Database.Error err : res.getErrors()) {
     global void finish(Database.BatchableContext BC){


In below report for account my total quote count should be 5(unique quote dates in a opportunity ) not 6 ,1,2,3 are from same opp with diff quote date,4 and 5 are with same quote date on single opportunity,6th is for single opp -single quote so my total quote count should be 5 .How to make this unique calculation based on quote date grouped by account.

User-added image

How can i execute a apex job using either of REST, Bulk or Partner API with C#?