You need to sign in to do that
Don't have an account?

Remove role filter on reports
We had our report filtered by "all" (i.e. "all oportunities"), now it appear as "all oportunities under role: X".
I think that this is a change from the latest release, but we need to be able to filter by just "all" like we had before.
Is there some way to achieve that without creating more roles?
Thanks.



Exception: duplicate value found: <unknown> duplicates value on record with id: <unknown>: []
Hi
I'm new to this so please forgive my ignorance.
I'm getting the exception when:
- insert an Opportunity
- insert a ContentVersion
- post the new ContentVersion to the Opportunity's chatter feed
- delete the Opportunity
Does anybody know why, and if so, how to overcome the exception?
I am using API version 26.0
Thanking you in advance
private static void TestOpportunityDeletion()
{
// create an opportunity
Opportunity opp = new Opportunity() ;
opp.Name = 'Test Name' ;
opp.StageName = 'Test Stage Name' ;
opp.CloseDate = Date.Today() ;
insert opp ;
// attach a document to its chatter feed
ContentVersion doc = new ContentVersion() ;
doc.Title = 'Test Version' ;
doc.PathOnClient = 'test version.docx' ;
doc.VersionData = Blob.ValueOf( 'test content' ) ;
doc.Origin = 'H' ;
insert doc ;
FeedItem post = new FeedItem() ;
post.Type = 'ContentPost' ;
post.ParentID = opp.Id ;
post.RelatedRecordID = doc.id ;
insert post ;
// delete the opportunity
delete opp ;
}



How to add Custom Objects to an App after creation of the objects?
Hi,
I am following the book "Developement with the Force.com platform" by JasonOuelette.
When creating the Custom Objects, I did not check the box to be visible in a tab, and so I could not add this object to the Custom App I was creating. Now I have a created fields and relationships in the custom object. How do I add this Object to the Custom App?
thanks
Svidya



It looks you havent create custom Tabs while defining custom objects first you need to create custom Tab for new objects Creating Tab Setup -->App Set up---> Create---> Tabs Click on new Tab [drop down shows all untabed objects ] select your object, set Tab style , click Next select profiles Save Adding To App Setup -->App Set up---> Create---> Apps Click on edit, edit available tab section Save Done Thanks, Bala

What happen when we get error in insert DML , which is used after database.insert()
How many total records will be committed to the database in this transaction?
A. 100
B. 2,100
C. 2,000
D. 0
Considering the salesforce documentation of Database.insert() when allOrNone is false, the answer should be A i.e 100. But, when I checked this on Anonymous window in developer console I get answer as D i.e 0.
Please help me with this solution.


All insertions took place in one transaction and the transaction fails, so all records are rolledback even the one inserted form Database.insert().

Service Console navigation bar customizing
i have a problem with the navigation bar in the service console. Why is this so different from the sales navigation bar?
I can not add some special tabs. I want to have the Tabs for Cases and for tasks in parallel on the navigation bar. As is see i can only have one "main" Tab where i can switch between them, but i can not have 2 tabs with "cases" and "tasks". is this right?
And when i add some new tabs like different cases they become very small and there is not text anymore. How can i change this behaviour? This is impractical..




Coming to Point 1 we may not be able to add two tabs like what you highlited.
Coming to the second request that when we pin the tab you are not able to see the label. This is known behaviour were an idea is open for the same . You can upvote this so salesforce may consider this in future releases.
https://ideas.salesforce.com/s/idea/a0B8W00000GdbLTUAZ/pin-tab-in-sales-console-should-keep-the-title-displayed
If this solution helps, please mark it as best answer.
Thanks,

SOAP header requires a String however Apex class is a complex type
Now unfortunately, the Apex class is sending the complex type information whereas the external system is expecting a string only.
Ie, External System format requires:
<soapenv:Header> <web:SessionType>none</web:SessionType> <web:PasswordText>topsecret</web:PasswordText> <web:UsernameToken>BROKER</web:UsernameToken> </soapenv:Header>However Salesforce is sending:
<env:Header> <PasswordText xmlns="http://siebel.com/webservices"> <inputParam>topsecret</inputParam> </PasswordText> <SessionType xmlns="http://siebel.com/webservices"> <inputParam>none</inputParam> </SessionType> <UsernameToken xmlns="http://siebel.com/webservices"> <inputParam>BROKER</inputParam> </UsernameToken> </env:Header>
This is what WSDL2Apex generated:
//Generated by wsdl2apex public class AFGFlexWebservices { public class SessionType_element { public String inputParam; private String[] inputParam_type_info = new String[]{'inputParam','http://siebel.com/webservices',null,'1','1','false'}; private String[] apex_schema_type_info = new String[]{'http://siebel.com/webservices','true','false'}; private String[] field_order_type_info = new String[]{'inputParam'}; } public class PasswordText_element { public String inputParam; private String[] inputParam_type_info = new String[]{'inputParam','http://siebel.com/webservices',null,'1','1','false'}; private String[] apex_schema_type_info = new String[]{'http://siebel.com/webservices','true','false'}; private String[] field_order_type_info = new String[]{'inputParam'}; } public class UsernameToken_element { public String inputParam; private String[] inputParam_type_info = new String[]{'inputParam','http://siebel.com/webservices',null,'1','1','false'}; private String[] apex_schema_type_info = new String[]{'http://siebel.com/webservices','true','false'}; private String[] field_order_type_info = new String[]{'inputParam'}; } }
Does anyone have any ideas how I can instead send through just a string for each header item rather than all the extra details?


For those who encounter same issue, we went with the Plan B using a REST post callout with manually created XML request body to resolve this. (only had a couple fields to send/receive from external system)
Tips, SOAPaction was required in the headers along with text/xml content type. Then parsed response with Document & XML classes

validation to prevent users from updating standard user fields


Create a validation rule like below on the user object:
For example the below formula will prevent all the users except "System Admin profile" (Since I am using Profile Id of system admin) users to edit "title" field on user record.
ProfileId != '00ef4000001sg2ZABC' && ISCHANGED( Title )You can replace and add more profiles which you want to prevent from editing with your orgs Profile Ids.
Note: Please make sure your validation rule is active and no other similar validation rules are in place.
Hope this helps! Please mark as best if it does.
Thanks

Does deploying profile through autorabbit deploy apex class and vf page access, other object access in salesforce?
2. Is there a way to assign apex classes to a profile through data loader?




You may have to add those apex classes and Vf pages in additional to the Profiles because the profile metadata only get the basic details of the profiles. If you need any additional access like field-level permissions or Object permissions or Apex Class Access you have to add those as well in the deployment.
Regarding the second question Did you try data loading on SetUpEntityAccess object?
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,

Test.isRunningTest() - Method does not exist or incorrect signature
We have an existing class that uses the Test.isRunningTest() method. Today we tried making changes to that class (completely unrelated to the isRunningTestMethod) and weren't able to save it because of a "method doesn't exist or incorrect signature" error on that method. Did something change with the Winter 12 release where we can no longer use this in code? If so, is there something replacing this functionality? If we should still be able to use it, any thoughts on why we are receiving this error now?
Save error: Method does not exist or incorrect signature: Test.isRunningTest()



Did you add a class to your org named Test?
If you add an Apex Class with the same name as a default class in Apex, all calls to that class will look at your class instead of the standard Apex classes.

Resume screen is too small




Apoligies but your requirement is still under Idea Exchange and with no Workaround on this .
I would request you to upvote this idea so that you can get update on the same .
Idea Exchange -> https://ideas.salesforce.com/s/idea/a0B8W00000GdowKUAR/allow-customizing-width-of-quick-action-popup-window-in-lightning
Please mark this as Best Answer for closing this loop and keeping our dev forum community clean .
Thank you.