• JohanLiljegren
  • NEWBIE
  • 89 Points
  • Member since 2007

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 83
    Replies

I'm trying to incorporate a jQuery Accordion (http://jqueryui.com/demos/accordion/) in a Visualforce page but it comes out garbled (see screenshot):

 

Garbled output

 

If I remove the standard stylesheets (standardstylesheets="false") and header (showheader="false") it comes out as I'd want it to (see screenshot):

Nice output

Problem is, I have other things on the page that needs the standard stylesheets.


How would I define the accordion so that it plays nice inside of a standard stylesheets Visualforce page?

I'm thinking I need to override some styles, but I can't figure out what/how.

 

Here's a short version of the page with just the accordion part:

<apex:page cache="false" expires="0" sidebar="false" >
    <apex:includeScript value="{!URLFOR($Resource.jquery, '/js/jquery-1.7.1.min.js')}"  />
    <apex:includeScript value="{!URLFOR($Resource.jquery, '/js/jquery-ui-1.8.18.custom.min.js')}"  />
    <apex:stylesheet value="{!URLFOR($Resource.jquery, '/css/ui-lightness/jquery-ui-1.8.18.custom.css')}"  />

    <script>
        $j = jQuery.noConflict();

        $j(document).ready(function($)
        {
            $j("#SFDCSalesPanel").accordion();
        });
    </script>

    <apex:pageBlock id="playBlock" >
        <div id="SFDCSalesPanel">
            <h3><a href="#">Header 1</a></h3>
            <div>Content 1</div>
            <h3><a href="#">Header 2</a></h3>
            <div>Content 2</div>
            <h3><a href="#">Header 3</a></h3>
            <div>Content 3</div>
        </div>
    </apex:pageBlock>
</apex:page>

 

Hi all,

 

I'm trying to share a record with certain users when they are assigned via a lookup (on Project_Activity__c) but i cant find the sharing object, i have a custom object Project__c but there isnt a sharing object Project_Share do i have to generate this somehow? the project is the master in a master detail relationship with Project_Activity__c. I've got the sample code from salesforce and it all looks ok but im getting invalid type Project_Share as this object doesnt exist, does anyone know what i need to do?

 

Thanks Guys

Hi Folks,

               How to update original object fields with update DML statement in trigger after insert event. My code:

 

trigger myTrigger on Account (after insert) {

Account myAccount = trigger.new[0];
myAccount.Type = 'Enterprise Customer';
update myAccount;
}

 

Here the update DML statement throws the exception: System.FinalException: Record is read-only:

 

Please let me know and all suggestions are appreciated with any sample code or correction to above code.

 

Thanks.

Hi,

Is it possible to create multiple user records by importing like record import using data loader?

 

Thanks

 

If a field is not visible,  sobject.fields.getMap() does not return that field. I was hoping it did and then I could check if the field is visible to current user (through isAccessibe)

 

In EE/UE, if I made a field invisible through field level security, this function does not return it.

In PE, if I remove it from screen layout,  the field is not returned either.

 

Is there another way? Seems like a bug that SFDC would not return all fields, but provide isAccessible function....

 

FYI, isAccessibile is inconsistent. If I remove from screen layout in EE/UE edition, it still return true. In the UI, it shows it as hidden under  Admin Setup->Security Controls->Field Accessibility). In Apex, it seems to mean visiblilty.

 

 

 

 

Hi Everyone,

 

I'm creating  PDF version of an object. This object has around 400 fields out of which only 120 have to be displayed (predefined list). I don't want to use form elements as they don't render properly on PDF.

 

What I'm hoping for

. .

Name Value

Field Name1Field Value1
Field Name2Field Value2
Field Name120Field Value120

 

 

the only solution, I could figure out was

<apex:outputText>{!$ObjectType.Detriot__c.Fields.Name.Label}</apex:outputText>

<apex:outputText>{!field1}</apex:outputText}

in side a <table> tag.

 

 but there are 120 fields and I have to do this for 30 more objects.Hardcoding doesn't seem like a good approach. Is there a more elegant way to do this? is there a way to perhaps make a list of field names and a list of values, then display those two lists as a table?

 

Thank you,

Sunny_Slp

 

I'm starting to get a little dangerous with APEX.  :smileyhappy:

 

My sandbox went down for mainteniance as I was getting ready to test this a second time - it didn;' work the first time.  I think I might be misunderstanding how trigger.old and new are suppsed to work.   Will this code automatically convert a lead when the status is changed to qualified?

 

Also - my test class only gets 76% converage.  To help get a better understanding, what would I need to add to get to 100%?

 

trigger LeadConvert on Lead (after update) {

  // no bulk processing; will only run from the UI and Lead Status must be changed to qualified 
  if (Trigger.new.size() == 1) {
    if (Trigger.old[0].isConverted == false)  {
    if (Trigger.new[0].isConverted == false && Trigger.new[0].Status == 'Qualified') {
 
              }
         }
    }
}

 Test Class:

 

public class LeadConvert {

    static testMethod void LeadConvert() {
    
    //create a lead with qualified status
    lead l1 = new lead();
    l1.status = 'Qualified';  
    l1.lastname = 'Joe';         
    l1.firstname = 'Smith';         
    l1.company = 'Company ABC'; 
    l1.isConverted = False ;
    insert l1;
    string holder = l1.id;
    
    //create lead that does not match criteria
    Lead L2 = new lead();
    L2.Status = 'Open';
    L2.lastname = 'Jane';         
    L2.firstname = 'Smith';         
    L2.company = 'Company DEF';
    L2.isConverted = False;
    insert L2;
    string holder2 = L2.id;  
    
    //Update 
    L2.Status = 'Qualified';
    update L2;
        }
 }

 

List<Course_Allocation__c> allocateList = new List<Course_Allocation__c>() ;

for(Lecturer__c lec: Trigger.new){                        
                myList.add(new Course_Allocation__c(Name = lec.Name, Full_Name__c = lec.Last_Name__c,
                Email__c = lec.Email__c, Mobile_Number__c = lec.Mobile_Number__c,
                Department__c = lec.Department__r.Name));
 }


But after insertion Department__c field is empty, why?


Hi,

 

I would like to know if anyone has any experience in building an approval process where the approvers are picked by the user before submitting the record for approval?

 

Basically, our use-case is as follows:

 

  1. We want to have a reference to multiple User objects (e.g. multi-select, multiple lookups - just assume this has been handled)
  2. Before submitting a record, the user picks one or several users as approvers
  3. When submitting the record, an approval process should be initiated
  4. Whenever an approver approves a record, it should go on to the next approver selected in the user list in step 1

I'm not sure if we can use the native approval process at all or if we are forced to basically code the whole flow ourselves?

 

Is it even possible to create approval processes in Apex? Can one intercept approval processes build by the native functionality and basically override who the next approver should be based on a set of criteria in the code?

 

I've found, and read, some topics on the boards but none of them seem to cover what we would like to achieve. Basically, we're looking for an extremely flexible solution where the submitter of the record decides the list of approvers.

 

I'm looking forward to some great input you guys.

 

Kind regards,

Søren Nødskov Hansen

Hi,

Can anyone please advise me as to how to measure User Adoption of customized functionalities built via Visualforce Pages, Apex codes, etc? Example, on a button click on Account detail page a Visualforce Page opens which shows Account Team Hierarchy of that account alongwith the teams at each account level(levels = 3).

I want to know how many users click on that button and see this page?

Similarly, there are couple of more Visualforce Pages on Account's and Contact's detail pages. I want to know whether users are really utilising it or not?

Is there any tool or App Exchange product/application for the same?

Please assist.


Thanks,

Vimal

How to access currency symbol of organization from Visual force page. (or Currency ISO Code)

 

Thanks in Advance.

hi folks,

 

I have written a trigger and caling a class from that. It is working fine for new records. If I use data loader then It is throwing me the followig error.

 

Too many DML statements: 151

 

How to resolve this error??

 

Thanks

Raj

We have a formula field on Account that displays the record type as text - it's not really for end user consumption (looking at a record will display the record type anyway) but to make life easier elsewhere. The formula is: $RecordType.Name

 

On a Case, we are trying to use the value of this field in another formula field. To make it easy, imagine we have a formula field on Case called "Account Record Type" - it's a formula that is essentially: Account.My_Custom_RecordType_Formula_Field__c

 

The problem is the value in the "Account Record Type" field on the Case is showing the Case's record type, not the account record type. It's almost as if the account field formula is being evaluated on the Case.

 

Is this standard behaviour? Any explanations? Thanks in advance, and sorry if this means I flunk config 101 :)

I have the need to import thousands of contacts from internet lists.  The lists are usually vertical instead of horizontal.  In other words, when I copy and paste into Excel, all the data goes into column A.  I need for the name to be in column A, the phone # in column B, etc.  I'm sure there is a way to pivot the data around and have tried using pivot tables but no luck so far.  Currently, I am having to cut and paste the data into the columns I need so it imports into SalesForce.  Anybody solved this issue before?

 

I am not sure which function should be used between ISNULL and ISBLANK.

 

Can anyone describe this for me?

 

Thank you in advance.

Requirement: A group of X people in the system should have the right to Add team members to Accounts. The group of people may belong to 1 single profile but not necessarily

 

Problem: This is what salesforce says about the permissions a user need to have to add a Team member to a Account Group.

a. He is a System Administrator

b. He is the Owner of the Account

c. He is the Manager of the Owner

d. He has Modify all Data and Manage user permission on his profile.

 

In my case, none of the above condition is satisfactory for the group of X people. Is there any other way I can give them the permission to add Account Team Member? I also found that if a User A is added to Account Team with Read/Write permission, he can add another Team Member  but he can only provide that other member Read Access.

 Can I use this in some way?