+ Start a Discussion
María Jesús CarmonaMaría Jesús Carmona 
Hi,
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.
Best Answer chosen by María Jesús Carmona
María Jesús CarmonaMaría Jesús Carmona
Solved itself, I think Salesforce put back the "Show all Opportunities" filter.
phil.vaseyphil.vasey 

Hi

 

I'm new to this so please forgive my ignorance.

 

I'm getting the exception when:

 

  1. insert an Opportunity
  2. insert a ContentVersion
  3. post the new ContentVersion to the Opportunity's chatter feed
  4. 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 ;
}

Best Answer chosen by Admin (Salesforce Developers) 
Jia HuJia Hu
Before ' delete opp ;' add
delete post;

Then your code will work.
svidyansvidyan 

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

Best Answer chosen by Admin (Salesforce Developers) 
b-Forceb-Force

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

Rahul Garg SFDRahul Garg SFD 
An Apex transaction insert 100 Account records and 2000 Contact records  before encountering a DML exception when attempting to insert 500 Opportunity records. The Account record are inserted by calling the database.insert() method with the allOrNone argument set to false. The Contact and Opportunity record are inserted using the stand-alone insert statement.
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.
Best Answer chosen by Rahul Garg SFD
Rahul Garg SFDRahul Garg SFD
Answer of this Question is D.

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

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..
Best Answer chosen by Benjamin Faltus
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Benjamin,

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,
Emma BindiEmma Bindi 
When parsing WSDL file into Apex we needed to change the header item (user/password) into complex type for Salesforce to accept it. 

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? 
Best Answer chosen by Emma Bindi
Emma BindiEmma Bindi
So! Resolution:
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 
Jennifer LariviereJennifer Lariviere 
Not having any success creating a Validation Rule on User to prevent the update of the standard User field "Title".
Best Answer chosen by Jennifer Lariviere
SarvaniSarvani
Hi Jennifer,

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
User 444User 444 
1. If I deploy a profile from autorabbit from dev to qa sandbox, will it deploy apex classes access, vf page access and other object settings in qa? Do i need to do anything manually in qa box again?

2. Is there a way to assign apex classes to a profile through data loader?
Best Answer chosen by User 444
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

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,





 
BrianHBrianH 

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()


Best Answer chosen by Admin (Salesforce Developers) 
spraetzspraetz

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.

Mahmoud Ibrahim MahmoudMahmoud Ibrahim Mahmoud 
After pausing a flow, it gets added to a list of paused interview flows. When I click resume, it opens the flow interview in a modal dialog (pop-up window), but I want it to display the flow interview in a full screen.
Best Answer chosen by Mahmoud Ibrahim Mahmoud
SubratSubrat (Salesforce Developers) 
Hi Mahmoud ,

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.