• Mellycooks
  • NEWBIE
  • 55 Points
  • Member since 2012
  • Senior Developer
  • Stand for Children


  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 13
    Replies
Has anyone else using Communities in a preview org seen that default text color and size is no longer controlled by the branding Palette?  All components in my community, custom and OOTB are defaulting to what looks like a standard Salesforce color, #0059a7.

As an example, if I add a Rich Content Editor component and add text, it does not obey the Text Color Set in branding.

In the screenshot here you can see the Branding editor is defulating text color to #51515, but without adding any custom coloring in the Content Editor, the text is showing up as #0059a7.  This behavior is consistent in all components, custom and Standard.  
Incorrectly Colored Text

This issue occurs whether or not I have upgraded my Napili Template.

I'm also attaching a screenshot of the inspector, which shows the computed style and rule.

Inspector
When I apply slds_theme styling in a component, the component styling seems to be overridden when used on a Communities page.  I am using the straight-up sample code from the SLDS.  Other SLDS styling is working just fine.  attached is the code and a screenshot of the component in communities (incorrect) and the same component on a Lighting Experience page (correctly styled)

The class is slds-theme--shade

Am I missing something about styling with SLDS in Communities?

code snipit
User-added image

User-added image
It looks to me like the insructions on part of this trail are out of order.  About halfway down you are creating the "handleCreateExpense" action handler. These are the instructions:
We’ll start with the handleUpdateExpense action handler. Here’s the code, and be sure to put it riiiiiight under the handleCreateExpense action handler.

It tells us to put it under the "handleCreateExpense" handler, but we haven't created that one yet.  The instructions to create it are further down in the instructions.  About another quarter of the way through we finally get to this:
Finally, for the last step, create the handleCreateExpense action handler in the expenses controller. Add this code right above or below the handleUpdateExpense action handler.​
 
Wanted to share since it caught me up for a bit.  Thought I had missed something in an earlier trail and went searching for it.
I see that you have to have communities enabled in order to make a Lightning Out app/component available to non-authenticated users.  

Does ayone know if there are any plans to make this feature usable for orgs that don't have Communities?  Perhaps utilizing sites?
In the Lightning Components Basics trail, I completed the Before You Start module and am getting the following fail when it checks my Org: Challenge Not yet complete... Could not find the 'Camping_Item__c' custom object...

The Getting started module doesn't mention a Camping Item at all.  Just the Expense object.  Since it's the first module in this trail, seems like a mismatch to me?  I think the error gives me enough info to fix it, but wanted to flag this.
 Screenshot
I'm working with the Bulk API, using the WSC to query records from Salesforce.  When I submit the getBatchResult request to BulkConnection and pass in the optional ContentType.JSON parameter, i get an error that seems to indicate a JSON Parsing error.  I know JSON support for this is new this release, perhaps a bug?  If I set the job Content Type as JSON, I have to use it consistently.

Details:  Query against the Contact Object,  Job executes fine, but cannot get BatchResult with JSON.  Here is the exception from the terminal:

Key line from log: Caused by: org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class com.sforce.async.Result] from JSON String; no single-String constructor/factory method

Full Exception Message:
[AsyncApiException  exceptionCode='ClientInputError'
 exceptionMessage='Failed to get result '
]

at com.sforce.async.BulkConnection.getBatchResult(BulkConnection.java:600)
at SObjectSynch.bulkFetch(SObjectSynch.java:261)
at CacheSynch$4.onMessage(CacheSynch.java:175)
at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyOnMessage(AbstractClientSession.java:394)
at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyMessageListeners(AbstractClientSession.java:385)
at org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:225)
at org.cometd.client.BayeuxClient.processMessage(BayeuxClient.java:736)
at org.cometd.client.BayeuxClient$PublishTransportListener.processMessage(BayeuxClient.java:1111)
at org.cometd.client.BayeuxClient$ConnectTransportListener.processMessage(BayeuxClient.java:1166)
at org.cometd.client.BayeuxClient$PublishTransportListener.onMessages(BayeuxClient.java:1086)
at org.cometd.client.transport.LongPollingTransport$TransportExchange.onResponseComplete(LongPollingTransport.java:297)
at org.eclipse.jetty.client.HttpExchange$Listener.onResponseComplete(HttpExchange.java:968)
at org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:279)
at org.eclipse.jetty.client.HttpConnection$Handler.messageComplete(HttpConnection.java:619)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:862)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
at org.eclipse.jetty.client.HttpConnection.handle(HttpConnection.java:275)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class com.sforce.async.Result] from JSON String; no single-String constructor/factory method
at org.codehaus.jackson.map.deser.std.StdValueInstantiator._createFromStringFallbacks(StdValueInstantiator.java:379)
at org.codehaus.jackson.map.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:268)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromString(BeanDeserializer.java:765)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:585)
at org.codehaus.jackson.map.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:104)
at org.codehaus.jackson.map.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909)
at com.sforce.async.BulkConnection.deserializeJsonToObject(BulkConnection.java:806)
at com.sforce.async.BulkConnection.getBatchResult(BulkConnection.java:587)
... 20 more
I'm having an issue with test methods for some new chatter functionality.

In my test method, if I query for a Public Chatter Group based on the group name, I get 'no rows for assignment' soql error.  If I attempt to insert a Group with that name within the test method, I get a 'DUPLICATE_VALUE, An active or archived group with this name already exists' error.

I'm not sure how to proceed with testing, if the group is not visible within test methods and I can't create it.
Is there a way to  filter a chatter feed by group id and user id using the Chatter API?  I want to pull just a specific user's posts out of a group feed.
Has anyone else using Communities in a preview org seen that default text color and size is no longer controlled by the branding Palette?  All components in my community, custom and OOTB are defaulting to what looks like a standard Salesforce color, #0059a7.

As an example, if I add a Rich Content Editor component and add text, it does not obey the Text Color Set in branding.

In the screenshot here you can see the Branding editor is defulating text color to #51515, but without adding any custom coloring in the Content Editor, the text is showing up as #0059a7.  This behavior is consistent in all components, custom and Standard.  
Incorrectly Colored Text

This issue occurs whether or not I have upgraded my Napili Template.

I'm also attaching a screenshot of the inspector, which shows the computed style and rule.

Inspector
When I apply slds_theme styling in a component, the component styling seems to be overridden when used on a Communities page.  I am using the straight-up sample code from the SLDS.  Other SLDS styling is working just fine.  attached is the code and a screenshot of the component in communities (incorrect) and the same component on a Lighting Experience page (correctly styled)

The class is slds-theme--shade

Am I missing something about styling with SLDS in Communities?

code snipit
User-added image

User-added image
It looks to me like the insructions on part of this trail are out of order.  About halfway down you are creating the "handleCreateExpense" action handler. These are the instructions:
We’ll start with the handleUpdateExpense action handler. Here’s the code, and be sure to put it riiiiiight under the handleCreateExpense action handler.

It tells us to put it under the "handleCreateExpense" handler, but we haven't created that one yet.  The instructions to create it are further down in the instructions.  About another quarter of the way through we finally get to this:
Finally, for the last step, create the handleCreateExpense action handler in the expenses controller. Add this code right above or below the handleUpdateExpense action handler.​
 
Wanted to share since it caught me up for a bit.  Thought I had missed something in an earlier trail and went searching for it.
Has anyone else using Communities in a preview org seen that default text color and size is no longer controlled by the branding Palette?  All components in my community, custom and OOTB are defaulting to what looks like a standard Salesforce color, #0059a7.

As an example, if I add a Rich Content Editor component and add text, it does not obey the Text Color Set in branding.

In the screenshot here you can see the Branding editor is defulating text color to #51515, but without adding any custom coloring in the Content Editor, the text is showing up as #0059a7.  This behavior is consistent in all components, custom and Standard.  
Incorrectly Colored Text

This issue occurs whether or not I have upgraded my Napili Template.

I'm also attaching a screenshot of the inspector, which shows the computed style and rule.

Inspector
When I apply slds_theme styling in a component, the component styling seems to be overridden when used on a Communities page.  I am using the straight-up sample code from the SLDS.  Other SLDS styling is working just fine.  attached is the code and a screenshot of the component in communities (incorrect) and the same component on a Lighting Experience page (correctly styled)

The class is slds-theme--shade

Am I missing something about styling with SLDS in Communities?

code snipit
User-added image

User-added image
It looks to me like the insructions on part of this trail are out of order.  About halfway down you are creating the "handleCreateExpense" action handler. These are the instructions:
We’ll start with the handleUpdateExpense action handler. Here’s the code, and be sure to put it riiiiiight under the handleCreateExpense action handler.

It tells us to put it under the "handleCreateExpense" handler, but we haven't created that one yet.  The instructions to create it are further down in the instructions.  About another quarter of the way through we finally get to this:
Finally, for the last step, create the handleCreateExpense action handler in the expenses controller. Add this code right above or below the handleUpdateExpense action handler.​
 
Wanted to share since it caught me up for a bit.  Thought I had missed something in an earlier trail and went searching for it.
In the Lightning Components Basics trail, I completed the Before You Start module and am getting the following fail when it checks my Org: Challenge Not yet complete... Could not find the 'Camping_Item__c' custom object...

The Getting started module doesn't mention a Camping Item at all.  Just the Expense object.  Since it's the first module in this trail, seems like a mismatch to me?  I think the error gives me enough info to fix it, but wanted to flag this.
 Screenshot
Is there a way to  filter a chatter feed by group id and user id using the Chatter API?  I want to pull just a specific user's posts out of a group feed.
We have a piece of code which is working fine for Salesforce licenses but is failing when it runs under Site Guest User licence in client's instance as a part of managed package. This code is in Attachment object 'on insert' trigger.
FeedItem resumeFile = new FeedItem(
	ParentId = resumePoolChatterGroup.Id,
	Type = 'ContentPost',
	ContentData = resumeAttachment.Body,
	ContentFileName = resumeAttachment.Name,
	CreatedById = idToContactMap.get(resumeAttachment.ParentId).OwnerId
);
It failed on line:
CreatedById = idToContactMap.get(resumeAttachment.ParentId).OwnerId
and tells:
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AVTRRT.Trigger_Attachment: execution of AfterInsert caused by: line 7, column 37: Dependent class is invalid and needs recompilation: AVTRRT.ChatterResume: line 70, column 66: Field is not writeable: FeedItem.CreatedById: []
In Salesforce documentation it tells:
If the logged-in user has the “Insert System Field Values for Chatter Feeds” user permission, the create field property is available on CreatedBy and CreatedDate system fields for this object. This allows the logged-in user to set these fields to the original post author and creation date upon migration instead of accepting the system field value when migrated, which would be the logged-in user and the date the migration was performed, respectively. The fields can't be updated after migration.
I tried to set “Insert System Field Values for Chatter Feeds” permission but didn't find such option.

Also, the issue is happening only for one of client's Force.com Site. For another one we don't have such issue.

Is it possible to make it work? 

I have written a trigger on the Campaign Member object that gives users access to our subscription service when their campagn status changes to 'Free Trial'. The trigger works without fail but the test is failing because of this error: 

 

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []

 

Here is my code:

@isTest
public with sharing class Test_Trial_Campaign {
	
	static testMethod void test(){
		
		list<Id> IdLst = new list<Id>();
		list<CampaignMember> cMemL = new list<CampaignMember>();
		
		Campaign testC = new Campaign(isActive = true, ActualCost = 0, Name = 'SystemTest');
		insert testC;
		system.debug(testC);
		
		CampaignMemberStatus status = new CampaignMemberStatus(CampaignId = testC.Id, HasResponded = true, label = 'Free Trial', SortOrder = 2);
		
		insert new list<CampaignMemberStatus>{status};
			
		for (Integer i=0; i<10; i++){
			Lead testL = new Lead(FirstName = 'Test', LastName = 'Testerino'+i, email = 'test@testing.co'+i, Trial_Product__c = 'SUB-RTE-01');
			insert testL;
			
			CampaignMember mem = new CampaignMember(CampaignId = testC.Id, LeadId = testL.Id, Status = 'Free Trial');
			IdLst.add(testL.Id);
			
			insert mem;
			
			CampaignMember testerino = [SELECT Id, Status from CampaignMember where id =:mem.Id];
			
			system.debug(testerino);

		}
	
		list<Lead> lList = [SELECT Id, isConverted From Lead Where Id IN: IdLst];
		
		for (Lead l: lList){
			system.debug(l);
			system.assert(l.IsConverted == true);
		}
	}
}

 

It fails when attempting to insert the CampaignMemberStatus. I have tried multiple workarounds, all of which have failed. Any insight is greatly apprechiated. 

I'd like to get the dates of the most recently completed activities for each of a set of contacts by using a single SOQL query.

I realize that I could fetch all completed activities for those contacts and iterate through them to find the most recent ones, but I'm wondering if it's possible to do this in a single query that only returns the data I need.

If I were writing SQL instead of SOQL, I would do something like the examples below. (I've omitted the where clauses for simplicity.)

select WhoId, Max(ActivityDate) 
from Task where ... Group By WhoId

 or less optimally,

select WhoId, 
   (select top 1 from ActivityDate from Task T2 where T1.Id = T2.Id order by ActivityDate desc)
from Task T1
where ...
Group By WhoId

 

Neither of these approaches seems to translate directly to SOQL. Is there an alternative?


Hi All,

 

I have created a Record Type for Opportunities. I have decided against using a Record Type so I now want to delete it.

I clicked Del and it lists the profiles that are using the RT. I have edited each profile, resetting the Record Type back to Master.

 

This works except for Standard Platform User. This profile does not have an option to set the RT for the Opportunities object. Opportunities is not listed at all for this profile.

 

I am now stuck with an unwanted RT. I can't delete it as SF says the profile is using it as the default.

 

Any ideas?

 

Thanks.

 

 

- Andy