• jlhmitchell
  • NEWBIE
  • 10 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 3
    Questions
  • 9
    Replies
I have case-trigger based behavior that will assign a case team member to a case based on a value on a field (exposed and editable by community users). If a contact doesn't exist, the contact is created prior to adding to case team.

This works fine, unless the account owner of the community user is an inactive user. In that scenario, the contact is not created.

I have tried to set the ownerID of the contact on create, but debug is showing me that the failure is still occurring with 
INACTIVE_OWNER_OR_USER, operation performed with inactive user [<Account Owner ID>] as owner of contact: 

My suspicion is that salesforce defaults to account owner ID, but allows on creation a different value (I can verify that the ownerID I set for contact is otherwise used when on an account that is not owned by an inactive user).

Is there something I am missing? Does anyone have suggestions? 
 

This is driving me crazy. I have an object (called WebSurveyQuestion__c) with a lookup field to an object called WebSurveyAnswerType__c. I would expect to have a child relationship on WebSurveyQuestion__c down to the WebSurveyAnswerType__c, but it's the reverse (the WebSurveyAnswerType__c object is the parent).

 

I keep trying to write the query on the question object, as that's where I can limit the results:

 

Select Id, (Select Public_Question_Label__c from WebSurveyQuestions__r), Public_Question_Label__c, Answer_Type__c

From WebSurveyQuestion__c WHERE Public__c = trueAND Parent_Question__c = ''order by Question_Order__c 

 

What I can't figure out is how to get the name for the AnswerType (Answer_Type__c in the above returns the ID, and I want to return the name).

 

What am I missing?

 

Is there some some way to traverse from child to parent? What relationship name would I use (the relationship name is defined for the child on the parent object, but not the opposite)?

Even in the summer 10 release on sandbox, I can't determine these things  (so I can't use custom templates). Has anyone had luck sniffing out these elements?

In my apex controller I call a SendEmail() method and it send an email correctly when called from one of my other methods but when I call it from another method in the same controller the body is empty. I have debuged the passed parameters and they are all the exact same as the method that works but it just sends an email with the correct subject with the body empty. The ResendEmail method is the one not working. 
public void SendEmail(ID et) {
        Messaging.SingleEmailMessage mail =new Messaging.SingleEmailMessage();
        Contact recipient = (Contact) currentrecord.getSObject('Contact');
		system.debug(et);
        system.debug(recipient.id);
        mail.saveAsActivity = true;
        mail.setTargetObjectId(recipient.Id);
        mail.setTemplateId(et);
        mail.setWhatId(currentRecord.id);
        system.debug(currentRecord.id);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
    }

    public PageReference ResendEmail() {
        system.debug(resendtype);
        String resendtype2 =resendtype.remove('RMA').trim();
        String templateID='';
        templateID= RMA__c.getInstance(resendtype2).Email_Template_ID__c;
        System.debug(templateID);
       
        Contact recipient = (Contact) currentrecord.getSObject('Contact');
        If(recipient.email == null || SkipEmail =='false') {
            system.debug('Email Will not be sent Recipient:' +recipient +' SendEmail:' +SkipEmail);           
        }
        Else {
            system.debug('Email Will be Sent');
            sendemail(templateid);       
        }

        List <Task> updates =new List <Task> ();
        for (Task email: [SELECT ID,Status,RecordTypeID,CreatedDate,Subject FROM Task Where WhatID = :currentrecord.ID Order by CreatedDate DESC limit 1]) {
            email.recordtypeID ='012Q00000004wNk';
            email.Type = resendtype;
            updates.add(email);
            update updates;
        }
        try {
            PageReference parentPage= new PageReference('/apex/RMA?scontrolCaching=1&id=' + currentRecord.Id);
            parentPage.setRedirect(true);
            return parentPage;
        }
        Catch(Exception ex) {
            ApexPages.Message msg =new ApexPages.Message(ApexPages.Severity.Error, ex.getMessage());
            ApexPages.addMessage(msg);
        }
        return null;
    }
Hi
I am experiencing unexpected behavoir with a map that contains sets of strings. The controller is below:
 
public class testbogusmap {
    public map<string,set<string>> BogusMap {get{
         map<string,set<string>> ret = 
                  new map<string,set<string>>();
         set<string> hiSet = new set<String>();
         hiSet.add('ho');
         ret.put('hey',hiSet);   
        return ret; }
    } 
}


The VF page is here:

 
<apex:page controller="testbogusmap">
    {!bogusmap}
    </apex:page>
My VF page displays

{hey=common.apex.runtime.impl.SetValue@d08}

instead of {hey='ho'} which is what is displayed in the developer console.  Why is this?

Thank you!
 

 
  • January 08, 2016
  • Like
  • 0
I have case-trigger based behavior that will assign a case team member to a case based on a value on a field (exposed and editable by community users). If a contact doesn't exist, the contact is created prior to adding to case team.

This works fine, unless the account owner of the community user is an inactive user. In that scenario, the contact is not created.

I have tried to set the ownerID of the contact on create, but debug is showing me that the failure is still occurring with 
INACTIVE_OWNER_OR_USER, operation performed with inactive user [<Account Owner ID>] as owner of contact: 

My suspicion is that salesforce defaults to account owner ID, but allows on creation a different value (I can verify that the ownerID I set for contact is otherwise used when on an account that is not owned by an inactive user).

Is there something I am missing? Does anyone have suggestions? 
 

This is driving me crazy. I have an object (called WebSurveyQuestion__c) with a lookup field to an object called WebSurveyAnswerType__c. I would expect to have a child relationship on WebSurveyQuestion__c down to the WebSurveyAnswerType__c, but it's the reverse (the WebSurveyAnswerType__c object is the parent).

 

I keep trying to write the query on the question object, as that's where I can limit the results:

 

Select Id, (Select Public_Question_Label__c from WebSurveyQuestions__r), Public_Question_Label__c, Answer_Type__c

From WebSurveyQuestion__c WHERE Public__c = trueAND Parent_Question__c = ''order by Question_Order__c 

 

What I can't figure out is how to get the name for the AnswerType (Answer_Type__c in the above returns the ID, and I want to return the name).

 

What am I missing?

 

Is there some some way to traverse from child to parent? What relationship name would I use (the relationship name is defined for the child on the parent object, but not the opposite)?

Hi there,

Is it possible to prevent user with 'Customer Community User' profile to access the  '_ui/search/ui/UnifiedSearchResults' page via our Community site?

Thank you

I have been tasked with finding some solutions for a problem we are facing with Internet Explorer 11 and Salesforce/Merchantforce.  The problem is that IE11 does not accept how Salesforce is processing AJAX calls to submit data, which generates an error in the console.

Here is the error message:

Unable to get property 'Submit' of undefined or null reference

And the html element that is generating this error:
<select  id="pageId:j_id5:Agreement:j_id9:j_id10:j_id12" name="pageId:j_id5:Agreement:j_id9:j_id10:j_id12" onchange="A4J.AJAX.Submit(&#39;pageId:j_id5&#39;,event,{&#39;similarityGroupingId&#39;:&#39;pageId:j_id5:Agreement:j_id9:j_id10:j_id12:j_id13&#39;,&#39;parameters&#39;:{&#39;pageId:j_id5:Agreement:j_id9:j_id10:j_id12:j_id13&#39;:&#39;pageId:j_id5:Agreement:j_id9:j_id10:j_id12:j_id13&#39;} ,&#39;status&#39;:&#39;pageId:st1&#39;} )"><option value="">--None--</option><option value="Custom CAA">Custom CAA</option>
<option value="Standalone Agreement Document">Standalone Agreement Document</option>
<option value="Standard CAA">Standard CAA</option>
</select>

We are also seeing this same kind of error on some Salesforce pages, like the page describing Inbount/Outbound Change Sets the first time you go to those areas in the Setup sub-site.  The button to dismiss the introduction page are broken and produce similar error messages in IE11.

This is a critical problem as our company is about to roll out IE11 to everyone and these issues are going to impact our end-users who cannot be expected to use non-IE browsers.

We contact Salesforce and they suggested overwriting the meta tag with ApexPages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=9');

The controller for our page is manged and cannot be edited so I have tried adding it in the extension controller and making an new extension controller for just this, but that did not work.

Does anyone have any suggestions?

Thanks in advance.