• Stuart_Kimble
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies

We're currently using a Husdson build server (that sits under my desk) to do hourly builds and run all tests. I now fancy a bit more leg room so was looking to see if anyone has used a hosted hudson / jenkins build server for their CI. All our code is stored in a hosted SVN repository and we also use the force-deploy-with-xml-report-task to do code coverage analysis.

Can someone explain how delegated authentication works / should be configured with respect to the following scenario.

 

Company A has a user stored in AD with username "firstname.surname".

 

Company A has setup delegated authentication in salesforce and mapped the Delegated Gateway url to an externally exposed web service that can authenticate users against their AD.

 

Since Company A cannot create a salesforce user with username firstname.surname (someone else in a different SF org is using this username) we create a salesforce username of format firstname.surname@companya.com.

 

User with username firstname.surname naviagtes to login.salesforce.com and types in firstname.surname as their username and types in their AD password. 

 

How does salesforce know that this user should be authenticated via delegation authentication? i.e. if there is a real salesforce user with username firstname.surname for an completely different org why doesn't salesforce return an invalid password error?

 

How can we map AD usernames to salesforce users?

 

 

Anyone experiencing problems using the developer console in chrome?

On launch I get script error "Uncaught Error: SYNTAX_ERR: DOM Exception 12" and the console fails to load / initialise.

 

I am using Chrome Version 22.0.1229.94 m. I have tried using a couple of dev orgs from Chrome with the same result. Both orgs Dev consoles work fine in FF.

How can I get a heap dump from a class deployed in a managed package. I can generate the detailed log by logging into the customer org via the LMA, but when I navigate to the class in the repository view of the Developer Console I get the message "Not permitted: managed installed classes cannot be opened". I need to open the class so I can set a heap dump to debug an issue I am having.

Since the summer 12 upgrade I have been experiencing trouble with our automated CI build. We use ant running in Hudson to build our entire source code every hour. Our build is contininually failing with random error ids for example (An unexpected error occurred. Please include this ErrorId if you contact support: 1777914353-1630 (1745488442)) with each ant deployment even if the source hasn't changed. In our build we have three classes defined as @RestResource. Through trial and error I have discovered that if I clear the contents of these classes so that only the class definition remains then our build passes without issue. If I then add the class body back in and do a deployment then the build also passes without issue. If I then do a deployment again it fails. It seems like I cannot deploy a RestResource class with a body if one already exists. I logged this with Salesforce support and they said it is just a random error and closed the case. Has anyone else experienced a problem like this. Just to note that our automated build including RestResource classes has no issues prior to the summer 12 upgrade.

 

Does anyone know if the Ant migration tool supports the new purgeOnDelete (introduced in summer 11) attribute of the deploy metadata command. I have downloaded the latest ant-salesforce.jar from my DE and run a deploy command and I get the following error.

 

 sf:deploy doesn't support the "purgeOnDelete" attribute

 

purgeOnDeletebooleanIf true, the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion.

This field is available in API version 22.0 and later.

This option only works in Developer Edition or sandbox organizations; it doesn't work in production organizations.

 

Does anyone know if the Ant migration tool supports the new purgeOnDelete (introduced in summer 11) attribute of the deploy metadata command. I have downloaded the latest ant-salesforce.jar from my DE and run a deploy command and I get the following error.

 

 sf:deploy doesn't support the "purgeOnDelete" attribute

 

purgeOnDeletebooleanIf true, the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion.

This field is available in API version 22.0 and later.

This option only works in Developer Edition or sandbox organizations; it doesn't work in production organizations.

Why following code does not work in Sweden locale?

Decimal d = 12345.67;
String s = d.format();
Decimal dd = Decimal.valueof(s); // throws 'System.TypeException: Invalid decimal: 12 345,67'

 

 

  • December 20, 2012
  • Like
  • 0

Anyone experiencing problems using the developer console in chrome?

On launch I get script error "Uncaught Error: SYNTAX_ERR: DOM Exception 12" and the console fails to load / initialise.

 

I am using Chrome Version 22.0.1229.94 m. I have tried using a couple of dev orgs from Chrome with the same result. Both orgs Dev consoles work fine in FF.

In Winter 12, @remoteAction methods were enhanced to allow "public" methods to be used in Visualforce controllers.  That's great.  I am curious about the profile requirements, though.

 

What I am finding is that, for non-admins, the Controller class needs to be assigned to their profile, but for admins it does not. I was under the impression that having a remote action in the main controller for a page would be enough.  By the user being assigned to the Page, they'd automatically have access to that page's remote action methods, but that doesn't seem to be the case.

 

My main concern is that I am introducing remote actions into a managed package app and it would be likely that my users are not assigned to the controller class in their profile.  I'd like to push upgrade the change so it "just works", but am worried about the side effects.

 

Is the requirement for apex class assignment in the Profile by design or is it a bug? 

  • December 13, 2011
  • Like
  • 0

Salesforce announced PermissionSet feature in its recent release, and I'm loving it. 

 

The Winter ‘12 Salesforce release has introduced Permission Sets as a new way to manage security within the application. Each user continues to have a Profile, but Permission Sets can now be given to individual users to extend their permissions beyond what is described in their Profile. One of the current limitations is that there is no way to manage assignments of Permission Sets for more than one user at a time, which makes administration tedious.

 

So I'm trying to build visualforce page for a System Administrator to manage (assign and remove) Permission Sets for more than one user at a time i.e., Develop a tool  to assign or remove one or more permission sets to or from one or more users.

 

However, I'm caught with error "Save error: DML not allowed on PermissionSetAssignment" when trying to make INSERT DML call on PermissionSetAssignment object. API version of my apex class is 23.0 and Docs too says that this object is Createable. 

 

What is that I'm missing or is it something not released yet?

Hello,

 

I have like 10 REST controllers with GET/PUT/POST methods. Are there any samples of Apex unit tests? I need to be able to upload this app so somehow I need to get to 75% mark .

 

Any help will be greatly appreciated.

 

Thanks,

Kam

Hi,

 

I am attempting to create a Visualforce page that contains a jQuery slider that will be used in a section on my account page. I uploaded the jquery zip file to the Statc Resources section and created a Visualforce page with the following code. The input fields show up not the slider does not and I can't seem to determine what I am missing. Any help would be greatly apreciated.

 

 

 

<apex:page standardController="Account" id="page" cache="false">
 
    <!-- Here we incldued the necessary jquery javascript and css files -->
    <script type='text/javascript' src="{!URLFOR($Resource.jquery, 'js/jquery-1.5.1.min.js')}"></script>
    <script type='text/javascript' src="{!URLFOR($Resource.jquery, 'js/jquery-ui-1.8.13.custom.min.js')}"></script>
    <link rel='stylesheet' type='text/css' href="{!URLFOR($Resource.jquery, 'css/ui-lightness/jquery-ui-1.8.13.custom.css')}" />

 
    <script type="text/javascript">
        var j$ = jQuery.noConflict();    
        //This will load as soon as the page is ready and will setup our slider
        j$(document).ready(function(){
            $("#slider-range").slider({ //This line creates a slider on the DIV specified, options are passed arguments, comma separated below
                range: true, //This give the slider and top and bottom
                min: 0, //Min value for slider
                max: 24, //Max value for slider
                step: .5, //Increment
                values: [0,0], //Start values for the slider
                slide: function(event, ui){ //This function executes every time slider is moved and applies the slider values to the input fields as well as the output below the slider
                    document.getElementById('{!$Component.page.form.block.values.MonOpen}').value = ui.values[0];
                    document.getElementById('{!$Component.page.form.block.values.MonClose}').value = ui.values[1];
                    $("#amount").val(ui.values[0] + ' - ' + ui.values[1]);
                }
            });
 
            //This line executes only once right after the page is loaded and after the slider is initialized. It creates the "0 - 24" text on load
            $("#amount").val(("#slider-range").slider("values", 0) + ' - ' + ("#slider-range").slider("values", 1));
        });
    </script>
 
    <apex:form id="form">
        <apex:pageBlock mode="edit" id="block">
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" />
            </apex:pageBlockButtons>
 
            <apex:pageBlockSection >
                <apex:outputField value="{!Account.Name}"/>
            </apex:pageBlockSection>
 
            <apex:pageBlockSection title="Business Hours" columns="2">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Business Hours"/>
                    <apex:pageBlockSectionItem >
                        <!-- This is where our slider will be -->
                        <div id="slider-range" style="font-size: 90%; margin-top: 0.5em;"></div>
                        <div id="amount" style="text-align: center;"></div>
                    </apex:pageBlockSectionItem>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
 
            <apex:pageBlockSection columns="1" id="values">
                <!-- You could make these fields apex:inputHidden and then use only the slider -->
                <apex:inputField value="{!Account.Monday_Open_Time__c}" id="MonOpen" />       
                <apex:inputField value="{!Account.Monday_Close_Time__c}" id="MonClose"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
 
</apex:page>