• VKrish
  • NEWBIE
  • 175 Points
  • Member since 2011

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 55
    Replies

Hi all,

 

I'm pretty new to SFDC development and I need to bulkify following trigger. I've checked multiple resources, but couldn't move forward. :(  Every help will be highly appreciated!

 

Regs

 

---------------------------------

 

trigger BI_Rental_CheckAssetStatus on Rental__c (before insert) {

// Disables to rent assets with other status than Available.

    for(Rental__c myRental : trigger.new){

        Asset__c myAsset = [SELECT status__c FROM Asset__c WHERE Id = :myRental.Asset__c];
    
        if(myAsset.status__c != 'Available'){
            myRental.addError('You cannot borrow asset, which has a different status than Available. Current asset status is ' + myAsset.status__c + '.');
        }

    }

}

 

---------------------------------

I have a trigger that just counts number of task created with certain values in custom fields.
I am assigning the result in a number field say "num_of_task_with_client"

I am using the following simple addition statement in the code:
        num_of_task_with_client += 1;

which basically means "num_of_task_with_client = num_of_task_with_client + 1;"
when the initial value of the custom field is 0 or blank, I am getting "Attempt to de-reference a null object" error.

But I dont understand why null pointer exception to be thrown on such a basic logical expression.
Why apex is not automatically takeing the blank number value as 0?
Does any one have faced this exception before?

We developed few WebService Classes last year and updated them with few new method now.

 

The last version of the WSDL file was generated in March & the current version have almost 1000 lines extra apart from the changes we made to the class.

The current version of WSDL have many unwanted, unintended information including other 3rd party tools that is integrated from AppExchange which are not related to the current web service class by any chance. And this strange behaviour is not seen in all updated WSDLs.

I am not sure if this update has anything to do with the Sales force version update to Summer 13.

Does any one else faced this issue? Do you think it will have any effects?

Let me know your thoughts on the reason & effects behind unwanted & unintended 1000 lines inclusion in selected WSDLs

Thanks in Advance!
Vidhya

I am fairly new to Salesforce & this is my 1st Email Alert with Work flow rule.

I did the following steps & the workflow rule fires & if I have a field update, it woks, but does not send email alert.

Please let me know what I am missing & why the email alert is not sending.

 

1. Created new Email Template in 'Work Flow Templates' folder with some field merges - using custom object fields in Subject & body. It is made 'Available for Use'

2. Created new workflow with a rule checking for ISCHANGED( Status__c ) of a custom object

3. Added new Email Alert - defined from email address, recipietns, choose the email Template created above

4. Activated the work flow.

 

If I add another test field update to the same workflow, the field update works. But still the email alert is not sent.

I have read the salesforce documentation on creating Email Alert & managing them. I dont seem to miss any steps.

 

Thanks in Advance!

Vidhya

  • March 14, 2013
  • Like
  • 0

Hello,

 

I have situation where our Marketing team wants to flood the Activity log of a contact (so that the info is in SFDC & easy to report to higher mgmt). But the Sales team (contact owners) dont want to see some of them.

 

I am thinking of few options, but would like to discuss which would be better or is there any other approach.

Since there is no sharing rule available for Activity, I have couple of thoughts:

 

1. Separating the Marketing related activity history to another custom object.

        Con: sales team wants some of the marketing activity. So separating certain type of marketing activity is going to be very inconsistent in data retrieving

2. Creating custom VF page for List Button to view marketing & sales activities separately

     Con: the related list in contact will still show unwanted marketing activities on top of important sales activities – there is no filters available in showing activity records in contact related list.

 

I am open for more ideas. Please share your thoughts on how to approach the issue.

 

Thanks in advance!

Vidhya

  • February 25, 2013
  • Like
  • 0

Hello,

 

In a custom object, we had a field that was mandatory for few months. But then due to business logic change, we made the custom field (Company Name) as not mandatory.

 

Even after makeing the field not required, the object is not accepting a record to be entered with blank Company Name.

I have double checked the Page layouts too if the Company name is made mandatory there.

 

Usually the records are entered to this object through webservice calls. The webservice calls also fail if the Company Name is blank.

 

Can any one give me some idea how to handle this.

 

Thanks

Vidhya

  • February 14, 2013
  • Like
  • 0

Hi All,

 

Here is my situation:

I have custom object with a trigger that updates a field in Contact. This trigger fires in insert, update & delete.

I also have a Contact trigger which updates this custom object (insert/delete) on certain conditions alone. The contact trigger also handles many other functionality, but each is executed only on certain condition.

The contact and custom object have master-child relationship. 1 contact can have many child custom objects.

 

On a particular condition, when a contact trigger insert or delete one of the child custom record, the recursion occurs which I want to stop.

To do this, I created a custom text field (source__c) in the custom object (custom__c) and updates the value of it (Ex: 'From Contact Trigger') in Contact trigger alone.

Now I want to exit from the Custom_Trigger without executing the rest of code when the custom__c.source__c == 'From Contact Trigger'

The break or continue statement wont work here. There is no exit() stmt. I also don't want to explicitly through error to the user since user.

 

I have developed a scheduled apex that does the same job as custom object trigger and run it once a day so the field value in contact updated.

So updating the contact field is taken care. But I want to avoid the exception which is preventing the custom record insert/delete during contact trigger.

 

Is there an elegant way to do this? Is there any method available in apex that substitute exit()?

 

Please help!

Thanks in advance!

We had a custom multi select pick list filed in Contact. Due to the data growth, we made the pick list into a new child object. Now a contact can be associated with many child records.

Ex: Contact_A can be interested in Custom_X, Custom_Y, Custom_Z. Initially this would typically have 1 contact record with X, Y, Z as values in pick list. But now, there are 4 records - 1 contact record & 3 child records associated with the 1 parent contact record.

The functionality works great with the child object displayed in the related list of contact detail page.
But I am having issues in Reporting when it comes to aggregation of child objects at parent level (something similar to inner-join query)

Some of the situation I need to report are:
1. Pull out all the contacts who are associated with both Custom_X and Custom_Y alone (this is not OR - AND alone)
2. Pull out all the Contacts who are associated with Custom_X and Custom_Y but not in Custom_Z. (This should looks for all Child Object records which are associated with same contact, but filter the above condition)

I couldn’t able to do this directly into a Report. Currently one of the option I could think is updating back Contact (due to 255 characters limit in text & text area cannot be used in report filters, In my case updating a multi select pick list again) with the child object value. But this doesn’t seem to be a correct solution.

 

Am I missing any other efficient way to get the aggrigation report of child object?
Any help is much appriciated.

Thanks in advance!

We had a custom multi select pick list filed in Contact. Due to the data growth, we made the pick list into a new child object. Now a contact can be associated with many child records.

Ex: Contact_A can be interested in Custom_X, Custom_Y, Custom_Z. Initially this would typically have 1 contact record with X, Y, Z as values in pick list. But now, there are 4 records - 1 contact record & 3 child records associated with the 1 parent contact record.

The functionality works great with the child object displayed in the related list of contact detail page.
But I am having issues in Reporting when it comes to aggregation of child objects at parent level (something similar to inner-join query)

Some of the situation I need to report are:
1. Pull out all the contacts who are associated with both Custom_X and Custom_Y alone (this is not OR - AND alone)
2. Pull out all the Contacts who are associated with Custom_X and Custom_Y but not in Custom_Z. (This should looks for all Child Object records which are associated with same contact, but filter the above condition)

I couldn’t able to do this directly into a Report. Currently one of the option I could think is updating back Contact (due to 255 characters limit in text & text area cannot be used in report filters, In my case updating a multi select pick list again) with the child object value. But this doesn’t seem to be a correct solution.

Intro about my situation...

I have defined 2 custom record type (RT1, RT2) in a custom object (say Custom__c). Each Record type has its own set of customized Picklist values (Custom_Type__c) & available to different set of Profiles (say R1 is available & default to Profiles X,Y,Z and R2 is available & default for Profiles A,B,C).

In a custom VF Page, I have one of the picklist value & depending up on the values they select, I will be displaying list of records to edit.

 

I need to develop...

Depending up on the user (from Profile A) who access the page, I want to display only the set of picklist values (Custom_Type__c values defiled under RT1).

I want to hide those picklist values that are not available ie., not defined for their respective Record Set.

Also I want make the default picklist value default in the page which defined in the Record Set's custom picklist field.

 

Initially I thought from Winter 11 release, this is made available automatically as in standard SF page. But its not fetching any data related to Record Set. It is displaying only the values defined in Master Record set.

 

I tried to use Custom__c.SObjectType.getDescribe().getRecordTypeInfosByName() &

Custom__c.Custom_Type__c.getDescribe().getPicklistValues()

But this returns only the master Record Type Picklist values & I couldn't continue much.

 

It would be great if anyone could guide me through proper methods to fetch the result I want.

Any help is much appreciated

 

Thanks in advance

Hi All,

 

I am new to Salesforce & I have few questions regarding Record Level Sharing Rules:

I have made the Accounts Private in Sharing Settings. But still all the Accounts are visible to everyone (Read only is the lowest level of security available in Account object).

   1. So is it possible to STOP users with Read Only permission on the Account to create a new Contact on that account or change the existing contact's Account to a Read Only account?

   2. The above sharing rule is preventing user when they click the Edit button of the Account. By if there is a trigger that is updating the Read Only Account, the above sharing rule does not prevent it. Ex: I have a trigger to update the Account's field (no. of contact) when a Contact's account is changed. It updates the count in both old & new Accounts. But why the sharing rule is preventing this? No exception or error is thrown. How do I solve this?

 

Please help me!

Thanks in advance

 

I want to create a map<id, List<id>> where key is the contact id & the value is the list of custom__c's id. Actually contact is a lookup in custom__c object & 1 contact can be link to many records in custom__c.

These are the ways I tried...

Map<id,List<Custom__C>> cMap = new Map<id,List<id>>([select contact__c, id from custom__c where contact__c in: conList group by contact__c]);



list<id> idList = new List<Id>();
for(AggregateResult results : [select Contact__c, Id FROM custom__c WHERE Contact__c IN :con GROUP BY Contact__c]){
idList.add((ID)results.get('Id'));
cMap.put((ID)results.get('Contact__c'),idList);
}

But I couldnt get what I want.

Can I use AggregateResultset just to get data grouped by something & without actually using any aggeregate methods like count(), sum() etc?

I dont want to put a select query inside contact for loop to avoid limits of governors. FYI, this code is inside contact trigger.

 

 

Any ideas?

  • April 25, 2012
  • Like
  • 0

Hi All,

 

I am trying the following:

Map<Id, Account> accMap = new Map<Id, Account>();
Map<Id, Custom__c> cMap = new Map<Id, Custom__c>();
accMap.putAll([select id, Name from Account]);
cMap.putAll([select id, cName__c from Custom__c]);

 It is working perfectly with Account.

But the last line is giving me error saying Map(List<Custom__c>) is not defined.

 

Does putAll method works only with standard objects?

What am I missing?

  • April 25, 2012
  • Like
  • 0

I am using jQuery TableSorter with Apex for my custom page. I have to display a table with 6 coulmns. 2 of them are input column.

My code is similar to this blog

http://salesforcegirl.blogspot.com/2011/03/jquery-table-sorter-meets-salesforce.html

The jQuery Table Sorter JS plugin works great in sorting table with each coulmn & in multiple column sorting too. It works perfectly in many browsers like FF, Chrome, IE 8.

But with IE 9 alone I have a problem. The sorting is still working. But when ever I try to sort the table even once, it errases all the available input value to null. The null values are not shown in the Page while sorting. But after clicking submit button, in my Apex method, all the values are passed as null.

Since jQuery tablesorter gives me easy & more functionlity than apex, I would like to stick with it insted of creating many classes for asc & dec sorting for each column.

Please help.

  • April 23, 2012
  • Like
  • 0

I am using jQuery TableSorter with Apex for my custom page. I have to display a table with 6 coulmns. 2 of them are input column.

My code is similar to this blog

http://salesforcegirl.blogspot.com/2011/03/jquery-table-sorter-meets-salesforce.html

The jQuery Table Sorter JS plugin works great in sorting table with each coulmn & in multiple column sorting too. It works perfectly in many browsers like FF, Chrome, IE 8.

But with IE 9 alone I have a problem. The sorting is still working. But when ever I try to sort the table even once, it errases all the available input value to null. The null values are not shown in the Page while sorting. But after clicking submit button, in my Apex method, all the values are passed as null.

Since jQuery tablesorter gives me easy & more functionlity than apex, I would like to stick with it insted of creating many classes for asc & dec sorting for each column.

Please help.

  • April 23, 2012
  • Like
  • 0

Hi all,

 

I am using jQuery Table Sorter with Apex to display set of 200 records in VF page.

My code resembles like the code described in the blog:

http://salesforcegirl.blogspot.com/2011/03/jquery-table-sorter-meets-salesforce.html

 

Everything is working as expected when I sort the data few times (2-3).

But if I test sorting more than few times (say 7-8 times), some of the data is lost. Is it something to do with table repeat?

Is there any limitation while using table repeat?

How ever the sorting is working no matter how many times I try to sort. Bur after some number of times sorting, some of the data is lost in VF page.

 

<script language="javascript" type="text/javascript">
      $(document).ready(function(){
            $("table").tablesorter({
                  headers: {
                     0: {sorter: 'text'},
                     1: {sorter: 'text'},
                     2: {sorter: 'text'},
                     3: {sorter: 'text'},
                     4: {sorter: 'text'},
                     5: {sorter: 'text'}
             }
      });
</script>
<table id="theTable" class="list tablesorter" cellspacing="1">
      <thead class="rich-table-thead">
           <tr class="headerRow">
                 <th colspan="1" scope="col">Level Of Interest</th>
                 <th colspan="1" scope="col">Re-Confirmed</th>
                 <th colspan="1" scope="col">Name</th>
                 <th colspan="1" scope="col">Type</th>
                 <th colspan="1" scope="col">Symbol</th>
                 <th colspan="1" scope="col">Group</th>
            </tr>
       </thead>
       <tbody>
           <apex:repeat value="{!Interest}" var="fi" id="subRepator">
               <tr class="dataRow {!fi.Type_Trimmed}">
                    <td>
                        <apex:selectList id="slIntrest" value="{!fi.Level_Of_Interest}" size="1">
                              <apex:selectOptions value="{!IntLevelOptions}"/>
                        </apex:selectList>
                        <apex:outputLabel value="{!fi.Level_Of_Interest}" style="visibility:hidden;"  />
                    </td>
                    <td> <apex:inputCheckbox value="{!fi.Confirmed}" rendered="{!fi.ReConfirmedCheckBoxRendered }"/></td>
                    <td><apex:outputLink value="/{!fi.InterestId}" title="{!fi.Name}" target="_blank">{!fi.Name}</apex:outputLink></td>
                    <td><apex:outputLabel value="{!fi.Type}"/></td>
                    <td><apex:outputLabel value="{!fi.Symbol}" /></td>
                    <td><apex:outputLabel value="{!fi.Group}" /></td>
                </tr>
           </apex:repeat>
     </tbody>
</table>

 

Please let help!

Thanks in advance

  • April 17, 2012
  • Like
  • 0

Hello,

 

I am trying to create a default value for a text field using formula.

I am using a custom field in the formula to have the text value accordingly.

The custom field I am using is a look up field. This is what I tried..

 

IF(NOT ISBLANK(Community_Registrant__c) , "Has Web Access", "" )

 

Error says Field may not be used in this type of formula!

I even tried using standard field in place of custom field. I still get the same error.

 

I have used formula to specify default value of custom fields before.

What am I doing wrong in this case?

Any help is appriciated

 

Thanks in advance

Vidhya

  • April 09, 2012
  • Like
  • 0

I am using web service to create a custom object called Registrant. The c# code send all the fields for this object.

I dont have problem in passing all other values except DateTime value during creation of the record.

The same value is passed during updating a record.

 

Initally the datetime value was not passed at all. So I followed the solution given in this form.

http://success.salesforce.com/questionDetail?qid=a1X30000000J7mhEAC

Now the value is passed during update & only not during Insert.

 

FYI: This is the code I am using in both the places - insert & update methods.

DateTime ppAck = DateTime.valueOf(mRec.privacyDate);

if(ppAck==null) cReg.Privacy_Policy_Date__c = null;

else cReg.Privacy_Policy_Date__c = ppAck;

 

mRec.privacyDate gives date time value when passed in update method & always gives null value when passed in insert method.

The c# code is also exactly same in both the places. The Date time value is passed from SF to C# too.

 

Any Ideas?

Thanks in advance.

  • March 30, 2012
  • Like
  • 0

I am new to apex programming.

I am writing a webservice class. Many of the functions I need is already available in one of the base class. But when I extend the base class in webservice class & call the functions, I get the error that method doesnot exist or incorrect signature. I googled and found that the static methods cannot override other method.

Is there a different way to implement the functions I already have in the webservice class?

Ex:

// base class

global virtual class Base{

  public boolean setMember(){

  // code

  }

  public string getMemberName(){

  //code

  }

}

// webservice class

global class Child extends Base{

  WebService static string getMemberName(){

  // repeate same code

  }

  WebService boolean string setMember(){

  // repeate same code

  }

}

 

I know I could call the base class method in java. But it is not allowed in apex.

Is there a way to avoid repeating same code in both the classes?

 

Any ideas is appriciated.

Thanks in advance

  • March 21, 2012
  • Like
  • 0

Hi All

 

We are using salesforce for office Desktop Integration. When an Email is sent to salesforce from Outlook, it creates a task to the appropriate contact/lead.

But with the status 'Call Completed'. But instead I want the status to be 'Email Sent'. This is same case even when you use 'Send An Email' button of a contact. Even there I want the status to be 'Email Sent' and not 'Call Completed'.

I think the functionality is handled via 'Log a Call' (which default status is Call Completed) instead of 'Send An Email'

 

Any of you faced the same problem? How did you resolve it?

Any idea how to change the status of Send An Email functionality without using VF page? Or writing the custom VF page is the only solution?

  • February 24, 2012
  • Like
  • 0

My organisation uses Outlook 2007 and salesforce for outlook. We are currently configured only salesforce events with outlook (not outlook task with sfdc)

When the email is sent from outlook by salesforce user to one of the contact, it is created as task in the contact with subject Email.

The problem I am facing is the Status of the Task is created as 'Call Completed' insted of 'Email Sent'

This problem occurs for only those who work in Windows 2007 OS.

Those who works with Vista, the Status of the task is created as 'Email Sent'.

I tried everything in configuration part. No success.

 

Anyone faced similar issue? Any ideas how to overcome this?

  • February 23, 2012
  • Like
  • 0

Hello,

 

I have situation where our Marketing team wants to flood the Activity log of a contact (so that the info is in SFDC & easy to report to higher mgmt). But the Sales team (contact owners) dont want to see some of them.

 

I am thinking of few options, but would like to discuss which would be better or is there any other approach.

Since there is no sharing rule available for Activity, I have couple of thoughts:

 

1. Separating the Marketing related activity history to another custom object.

        Con: sales team wants some of the marketing activity. So separating certain type of marketing activity is going to be very inconsistent in data retrieving

2. Creating custom VF page for List Button to view marketing & sales activities separately

     Con: the related list in contact will still show unwanted marketing activities on top of important sales activities – there is no filters available in showing activity records in contact related list.

 

I am open for more ideas. Please share your thoughts on how to approach the issue.

 

Thanks in advance!

Vidhya

  • February 25, 2013
  • Like
  • 0

Hello,

 

In a custom object, we had a field that was mandatory for few months. But then due to business logic change, we made the custom field (Company Name) as not mandatory.

 

Even after makeing the field not required, the object is not accepting a record to be entered with blank Company Name.

I have double checked the Page layouts too if the Company name is made mandatory there.

 

Usually the records are entered to this object through webservice calls. The webservice calls also fail if the Company Name is blank.

 

Can any one give me some idea how to handle this.

 

Thanks

Vidhya

  • February 14, 2013
  • Like
  • 0

Hi All,

 

Here is my situation:

I have custom object with a trigger that updates a field in Contact. This trigger fires in insert, update & delete.

I also have a Contact trigger which updates this custom object (insert/delete) on certain conditions alone. The contact trigger also handles many other functionality, but each is executed only on certain condition.

The contact and custom object have master-child relationship. 1 contact can have many child custom objects.

 

On a particular condition, when a contact trigger insert or delete one of the child custom record, the recursion occurs which I want to stop.

To do this, I created a custom text field (source__c) in the custom object (custom__c) and updates the value of it (Ex: 'From Contact Trigger') in Contact trigger alone.

Now I want to exit from the Custom_Trigger without executing the rest of code when the custom__c.source__c == 'From Contact Trigger'

The break or continue statement wont work here. There is no exit() stmt. I also don't want to explicitly through error to the user since user.

 

I have developed a scheduled apex that does the same job as custom object trigger and run it once a day so the field value in contact updated.

So updating the contact field is taken care. But I want to avoid the exception which is preventing the custom record insert/delete during contact trigger.

 

Is there an elegant way to do this? Is there any method available in apex that substitute exit()?

 

Please help!

Thanks in advance!

Intro about my situation...

I have defined 2 custom record type (RT1, RT2) in a custom object (say Custom__c). Each Record type has its own set of customized Picklist values (Custom_Type__c) & available to different set of Profiles (say R1 is available & default to Profiles X,Y,Z and R2 is available & default for Profiles A,B,C).

In a custom VF Page, I have one of the picklist value & depending up on the values they select, I will be displaying list of records to edit.

 

I need to develop...

Depending up on the user (from Profile A) who access the page, I want to display only the set of picklist values (Custom_Type__c values defiled under RT1).

I want to hide those picklist values that are not available ie., not defined for their respective Record Set.

Also I want make the default picklist value default in the page which defined in the Record Set's custom picklist field.

 

Initially I thought from Winter 11 release, this is made available automatically as in standard SF page. But its not fetching any data related to Record Set. It is displaying only the values defined in Master Record set.

 

I tried to use Custom__c.SObjectType.getDescribe().getRecordTypeInfosByName() &

Custom__c.Custom_Type__c.getDescribe().getPicklistValues()

But this returns only the master Record Type Picklist values & I couldn't continue much.

 

It would be great if anyone could guide me through proper methods to fetch the result I want.

Any help is much appreciated

 

Thanks in advance

Hi,

 

I have trigger called "OpportunityChange" this will be fired if there is any change (insert/update/delete) on Oportunity Object.

I have lot of ther clases which does insert/update/delete operations on Opportunity object. I want to stop the trigger "OpportunityChange" from being fired if it is called from a class "OpportunityEquipment" but it needs it be fired if it is called from other classes.

 

Please let me know how to achieve this. (I am ready to change the class "OpportunityEquipment" and "opportunitychange" trigger only to get this functionality but other classes which calls the trigger shouldnot be changed).

 

Thanks,

JBabu.

  • June 13, 2012
  • Like
  • 0

Hello everyone. I am trying my hand at my first trigger and was wondering if anyone could help start me off.

What I want to do is create a new custom object record if any of a set of fields on the opportunity are changed. The custom object is a "Provisioning Change", basically a ticket for our provisioning department, to let them know that something relevant has changed.
I would like to be able to list or link the fields that have changed, and the prior and new values. Like a replica of the history object, basically.

Any help would be much appreciated! Thanks!

Could a hand, this save error is rather vague and does not give a line number (line 0). Save error: Expression cannot be assigned. I am making a trigger that takes a zip code from a record and fills in the district based of a table of zip codes and districts. 

 

trigger VolunteerBeforeInsert on Volunteer__c (before insert) {

for(Volunteer__c a: Trigger.new) {
if (a.District__c == Null && a.Zip_Code__c != Null) {
string sZip = a.Zip_Code__c;
Zip_Code__c oZip = [SELECT Name, District__c FROM Zip_Code__c WHERE Zip_Code__c.Name = :sZip LIMIT 1].get(0);
Distric__c oDistrict = [SELECT id FROM District__c WHERE District__c.Name = :oZip.District__c LIMIT 1];
volunteer__c.District__c = oDistrict.id;
}
}

}

  • May 30, 2012
  • Like
  • 0

Hi All,

 

I am new to Salesforce & I have few questions regarding Record Level Sharing Rules:

I have made the Accounts Private in Sharing Settings. But still all the Accounts are visible to everyone (Read only is the lowest level of security available in Account object).

   1. So is it possible to STOP users with Read Only permission on the Account to create a new Contact on that account or change the existing contact's Account to a Read Only account?

   2. The above sharing rule is preventing user when they click the Edit button of the Account. By if there is a trigger that is updating the Read Only Account, the above sharing rule does not prevent it. Ex: I have a trigger to update the Account's field (no. of contact) when a Contact's account is changed. It updates the count in both old & new Accounts. But why the sharing rule is preventing this? No exception or error is thrown. How do I solve this?

 

Please help me!

Thanks in advance

HI! 

I am hoping someone can help. 

I have 2 custom user look up fields on the user object, (approver 1 and approver 2)

I am looking for a way to update the lookup fields (approver 1 and approver 2)  on a custom object, when the approver 1 and approver 2 fields on the user record are updated. 

 

Thank you in advance for your help!

Hi all,

 

I am using jQuery Table Sorter with Apex to display set of 200 records in VF page.

My code resembles like the code described in the blog:

http://salesforcegirl.blogspot.com/2011/03/jquery-table-sorter-meets-salesforce.html

 

Everything is working as expected when I sort the data few times (2-3).

But if I test sorting more than few times (say 7-8 times), some of the data is lost. Is it something to do with table repeat?

Is there any limitation while using table repeat?

How ever the sorting is working no matter how many times I try to sort. Bur after some number of times sorting, some of the data is lost in VF page.

 

<script language="javascript" type="text/javascript">
      $(document).ready(function(){
            $("table").tablesorter({
                  headers: {
                     0: {sorter: 'text'},
                     1: {sorter: 'text'},
                     2: {sorter: 'text'},
                     3: {sorter: 'text'},
                     4: {sorter: 'text'},
                     5: {sorter: 'text'}
             }
      });
</script>
<table id="theTable" class="list tablesorter" cellspacing="1">
      <thead class="rich-table-thead">
           <tr class="headerRow">
                 <th colspan="1" scope="col">Level Of Interest</th>
                 <th colspan="1" scope="col">Re-Confirmed</th>
                 <th colspan="1" scope="col">Name</th>
                 <th colspan="1" scope="col">Type</th>
                 <th colspan="1" scope="col">Symbol</th>
                 <th colspan="1" scope="col">Group</th>
            </tr>
       </thead>
       <tbody>
           <apex:repeat value="{!Interest}" var="fi" id="subRepator">
               <tr class="dataRow {!fi.Type_Trimmed}">
                    <td>
                        <apex:selectList id="slIntrest" value="{!fi.Level_Of_Interest}" size="1">
                              <apex:selectOptions value="{!IntLevelOptions}"/>
                        </apex:selectList>
                        <apex:outputLabel value="{!fi.Level_Of_Interest}" style="visibility:hidden;"  />
                    </td>
                    <td> <apex:inputCheckbox value="{!fi.Confirmed}" rendered="{!fi.ReConfirmedCheckBoxRendered }"/></td>
                    <td><apex:outputLink value="/{!fi.InterestId}" title="{!fi.Name}" target="_blank">{!fi.Name}</apex:outputLink></td>
                    <td><apex:outputLabel value="{!fi.Type}"/></td>
                    <td><apex:outputLabel value="{!fi.Symbol}" /></td>
                    <td><apex:outputLabel value="{!fi.Group}" /></td>
                </tr>
           </apex:repeat>
     </tbody>
</table>

 

Please let help!

Thanks in advance

  • April 17, 2012
  • Like
  • 0

Anyone know how to test Catch blocks. I've looked around for creating Catch test conditions but have been unsuccessful so far.

 

Code Snippet:

            insert skEnroll;
        } 
        catch (DMLException e) {            
            ApexPages.addMessages(e);            
            return null;
        }
        return page.aeskenrollconfirm; 
    }        
}

 

Hi SFDC developers -

 

I've been trying to see if there is a way in Apex to retrieve the values of a picklist by record type.  The getPickListValues() method doesnt seem to take input arguments for record type id.  Also the DescribeSObjectResult object seems to retrieve record types info, but this child object doesnt seem to be able to get the values either.   Is there sometihng I'm missing or is there another creative solution for this?  

 

The basic requirement is on VF page to dynamically show task object picklist values based on what country a user is  from (we'll get that off user record and match to a record type on the task object and get the appropriate values). 

 

Thanks everyone!