-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
2Likes Given
-
3Questions
-
9Replies
How is contact ownership defined (defaulted) when contact created by community user?
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?
- jlhmitchell
- January 07, 2016
- Like
- 0
- Continue reading or reply
Custom object with lookup field, but the relationship is one-way and can't figure out the query
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:
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)?
- jlhmitchell
- February 22, 2011
- Like
- 0
- Continue reading or reply
Knowledge/Article templates: any way to expose the voting section or discover url for attachments?
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?
- jlhmitchell
- June 11, 2010
- Like
- 0
- Continue reading or reply
Messaging.SingleEmailMessage() not showing body
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; }
- Matt Robertson
- January 10, 2016
- Like
- 0
- Continue reading or reply
Maps with Collections - Collections are not correct on vf page
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!
- RossK
- January 08, 2016
- Like
- 0
- Continue reading or reply
How is contact ownership defined (defaulted) when contact created by community user?
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?
- jlhmitchell
- January 07, 2016
- Like
- 0
- Continue reading or reply
Custom object with lookup field, but the relationship is one-way and can't figure out the query
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:
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)?
- jlhmitchell
- February 22, 2011
- Like
- 0
- Continue reading or reply
Hide _ui/search/ui/UnifiedSearchResults page From Community User
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
- Pairin Mason
- October 14, 2015
- Like
- 2
- Continue reading or reply
Issues with Internet Explorer 11 and Salesforce Generated Code
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('pageId:j_id5',event,{'similarityGroupingId':'pageId:j_id5:Agreement:j_id9:j_id10:j_id12:j_id13','parameters':{'pageId:j_id5:Agreement:j_id9:j_id10:j_id12:j_id13':'pageId:j_id5:Agreement:j_id9:j_id10:j_id12:j_id13'} ,'status':'pageId:st1'} )"><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.
- George Williams
- October 07, 2015
- Like
- 3
- Continue reading or reply