• Baird Straughan
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
Merging Contacts within Account erases the Primary > flag on Account Contact Role

Here is the problem, which I have reproduced in several instance, including a brand new instance which I created just to make sure the problem wasn't in my own triggers.  The following screenshots are from that brand new instance, to which I have added nothing at all.
To reproduce the problem:
Create two accounts, each with one contact.  Set each contact to be primary contact role in the account.
User-added image

User-added image
Merge the two accounts.

Now we have one account with two contacts.  One contact still has an Account Role marked Primary.  So far so good.
User-added image
Now merge the two contacts.  Set the master contact to be the one with the Primary checkbox.
User-added image
Now the remaining contact is no longer the primary contact role.  That's the problem.
User-added image
I've created a case but Sakshur Mathur at Support says this is the way Salesforce is supposed to work and refuses to escalate the case.  I find it hard to believe that losing data from an Account Contact Role record is expected behavior.
My clients use the Primary Contact role to pull their mailing lists, which is the most important thing they do with the database.  So when it disappears, that's a problem.
Am I crazy?


 
I have embedded a Google Map in a Visualforce page, and included markers and labels based on data from Salesforce.

But Google Maps can't handle the large KML layers I need to add to the map for the client.

Is there a way to embed an ARCGIS map in a Visualforce page, and include markers based on my Salesforce data?

Thanks, 
Baird
Data.Com setup options don't appear in a developer instance I created in 2012, and now I verify they also don't appear in production instances created in 2012 and 2009.  My clients need the Data.Com functions, and I'm deploying new code that takes advantage of them.  Or I'm trying to.

Data.Com setup options should appear in the left menu bar:

Correct options showig for Data.Com
But my older development (and production) instances only show:

User-added image
I've spoken with the Data.Com tech support and they tell me that for the developer instance, I have to create a new developer instance and then migrate my code and data over to it.  The old template apparently doesn't support data.com fully.  Okay, I can live with that.

But now I'm worried that the same is also true of my clients' production instances which I created before 2012.  Their menus lack the Data.Com options as well.  Does this mean if I want to deploy code that relies on Data.Com I have to move them to a new instance and migrate all their data?  If so, that's a major problem. and it's hard to believe no one has raised a warning.

Somebody please tell me I'm crazy.  I'll update this when I hear back from tech support.
I'm trying to deploy a build that includes a fieldsets.  In the package document I have tried to retrieve using:
 
<types>
        <members>MyFieldset</members> 
        <name>Fieldset</name>
</types>
and
<types>
        <members>Account.MyFieldset</members> 
        <name>Fieldset</name>
</types>
and
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>Fieldset</name>
</types>

The rest of the package retrieve and deploys fine but when I include the code for fieldset I get this error:

Entity type: 'Fieldset' is unknown

Are fieldsets not deployable via ANT?  If that's the case, it should be documented somewhere.
I'm creating a VF page with all our dashboards in it, and I need this to be deployable across multiple instances.  The VF page extracts the HTML from the Dashboards page via 
PageReference dbPage = new PageReference(SFServerURL + '/' + DashboardId);
                Blob pageBlob = dbPage.getContent();
                DashboardBlobString = pageBlob.toString(); 
The trick is to ge the write SFServerURL, because at this moment the current system URL is pointed to the Visualforce page, 
https://c.na3.visual.force.com/apex/WGDashboardsPage
And that's required me to figure out how to discard the "c." and the "visual.force." etc. and get back to the internal UI's base URL, which is "https://na3.salesforce.com", and to come up with a method which is reliable for all the deployments.
After much searching through the various message boards here's what I came up with, which I believe is more reliable than other versions I've seen, so I'm sharing it.  If you can suggest improvements, please do.
 
string SFServerURL = URL.getSalesforceBaseURL().toExternalForm(); 
        // Use .substringBetween() because we don't know how many characters are in the server name
        string SFInstance = SFServerURL.substringBetween('https://','.');
        // But sometimes Salesforce inserts a "c." in front of the server number, so SFINstance is just "c"
        // Since Salesforce may decide to use other prefixes in the future ...
        if (SFInstance.length()==1) {
            string HTTPSMask = SFServerURL.LEFT(10);
            SFInstance = SFServerURL.substringBetween(HTTPSMask,'.');
        }
        SFServerURL = 'https://' + SFINstance + '.salesforce.com';
        try{
        id DashboardId = [select id from Dashboard where DeveloperName = 'WG_Dashboard'][0].id;
        system.debug('URLstring for dashboards is '+ SFServerURL + '/' + DashboardId);
        PageReference dbPage = new PageReference(SFServerURL + '/' + DashboardId);
                Blob pageBlob = dbPage.getContent();
                DashboardBlobString = pageBlob.toString(); 
        } catch(Exception e){
            apexPages.addMessage(new ApexPages.message(ApexPages.severity.Error,
                       'Please tell WaterGrass support about this error: '+e));
        }
I'm looking forward to your suggestions.

 
I have embedded a Google Map in a Visualforce page, and included markers and labels based on data from Salesforce.

But Google Maps can't handle the large KML layers I need to add to the map for the client.

Is there a way to embed an ARCGIS map in a Visualforce page, and include markers based on my Salesforce data?

Thanks, 
Baird
Data.Com setup options don't appear in a developer instance I created in 2012, and now I verify they also don't appear in production instances created in 2012 and 2009.  My clients need the Data.Com functions, and I'm deploying new code that takes advantage of them.  Or I'm trying to.

Data.Com setup options should appear in the left menu bar:

Correct options showig for Data.Com
But my older development (and production) instances only show:

User-added image
I've spoken with the Data.Com tech support and they tell me that for the developer instance, I have to create a new developer instance and then migrate my code and data over to it.  The old template apparently doesn't support data.com fully.  Okay, I can live with that.

But now I'm worried that the same is also true of my clients' production instances which I created before 2012.  Their menus lack the Data.Com options as well.  Does this mean if I want to deploy code that relies on Data.Com I have to move them to a new instance and migrate all their data?  If so, that's a major problem. and it's hard to believe no one has raised a warning.

Somebody please tell me I'm crazy.  I'll update this when I hear back from tech support.
I have implemented the start method but still am getting above error.
below is my code. could anyone explain me.
global class Sample_Contactupdate_Batch implements Database.batchable<Contact> {
    
    global database.QueryLocator start(Database.BatchableContext jobid)
    {
        String query='select id,name,DOB__c from Contact where createdDate<=180' ;
          return  database.getQueryLocator(query);
        // we can query upto 50 million records
    }
    global void execute(Database.BatchableContext jobid,list<Contact> scope)
    {
        List<Contact> ctc=new List<Contact>();
        //Contact c=new Contact();
        for(Contact c:scope)
        {
            c.DOB__c=system.today+200;
           ctc.add(c);
        }
        update ctc;
    }
    global void finish(database.BatchableContext jobid)
    {
        
    }

}
I have embedded a Google Map in a Visualforce page, and included markers and labels based on data from Salesforce.

But Google Maps can't handle the large KML layers I need to add to the map for the client.

Is there a way to embed an ARCGIS map in a Visualforce page, and include markers based on my Salesforce data?

Thanks, 
Baird
I'm trying to deploy a build that includes a fieldsets.  In the package document I have tried to retrieve using:
 
<types>
        <members>MyFieldset</members> 
        <name>Fieldset</name>
</types>
and
<types>
        <members>Account.MyFieldset</members> 
        <name>Fieldset</name>
</types>
and
<types>
        <members>Account.fieldset.MyFieldset</members> 
        <name>Fieldset</name>
</types>

The rest of the package retrieve and deploys fine but when I include the code for fieldset I get this error:

Entity type: 'Fieldset' is unknown

Are fieldsets not deployable via ANT?  If that's the case, it should be documented somewhere.