• forcedotcom
  • NEWBIE
  • 199 Points
  • Member since 2009

  • Chatter
    Feed
  • 8
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 118
    Replies

We're cloning a custom quote object record with a button that references an Apex Class.  Currently the clone button results in creating a cloned record with the default record type.  I would like to specify that the record type of the original record is also the record type of the cloned record.

 

Is this possible?

  • August 25, 2010
  • Like
  • 0

Hi,

 

I want to get my dashboard to refresh automatically without doing it manually everytime i need. I want to schedule my dashboard which will be refreshed everyday. Is this possible to do? If yes, let me know how?

 

Thanks,

  • August 23, 2010
  • Like
  • 0

Hi,

 

I need to know what is the best approach for using XML data in salesforce. The situation I have is something like this, I have to use a XML file that is served by an external server and then use that data to make table in salesforce. Method of getting the XML file is simply by URL

 

Thanks

Hi,

I have a very basic question which I cannot find an answer to. When I create a custom object tab - which fields will be shown on the object's table on the tab? Can I choose which fields to show?

 

  • August 18, 2010
  • Like
  • 0

Hello,

 

I am Systemadminstrator. I deleted a Master-Detail relation from one object and tried to define a new one to another Object than the first. But the system tells me I am not authorized to do that. All Objects and Fields were defined by me with the standard-rights.

Can anyone help me? Thanks!

 

Harry

Hello:

 

We are in the process of cleaning up duplicate fields, so part of my task is to take the data entered in Field A, move that data to Field B, and then delete Field A entirely.  (Currently, approx. 1500 records are using Field A and approx. 1500 records are using Field B to store the same information--imagine a field called Birthdate and another field called Date of Birth, one field used for one record type and one field used for another.  That's the kind of situation I'm trying to clean up in our org, specifically for Accounts.)

 

Do folks have a suggestion for the easiest way to go about this?  I was hoping to use the SForce Connector for Excel, but as far as I can tell, it won't let me access any fields related to Person Accounts.

 

I'd imagine Salesforce has something out-of-the-box for such situations, but I'm new to the data management aspect of SF.  Is Setup > Administration Setup > Data Management > Data Export where I should start?

 

Any/all help would be greatly appreciated!  Thanks in advance.

hello,

 

I currently have an Opportunity button, that preforms a function of changing a drop down field to a specific item.  Listed below.  My question is, I want to make a new button to change another field in the Opportunity, and I don't know how to specify the field like the code below "&opp11".  I assum "opp11" designates list field number.  How do I know what the field numbers are, like opp12, opp13, etc.?

 

/{!Opportunity.Id}/e?
save=1
&opp11="Closed Won"
&retURL=%2F{!Opportunity.Id}

 

Thanks.

  • August 13, 2010
  • Like
  • 0

I have case header having a field called total billed amount. I have other cases as line items having a field called billed amount. Now, I want to auto-calculate the header total billed amount as sum of line items billed amount. Is it possible?

 

Also how do I differentiate between header and line items for the case? I am thinking of having record types or having a picklist to choose between header and line items. Please advise.

 

CASE(Plan_Year_End__c,
'12/31', DATE(YEAR(TODAY()),10,25),
'1/31', DATE(YEAR(TODAY()),11,25),
'2/28', DATE(YEAR(TODAY()),12,23),
'3/31', DATE(YEAR(TODAY()),1,23),
'4/30', DATE(YEAR(TODAY()),2,22),
'5/31', DATE(YEAR(TODAY()),3,25),
'6/30', DATE(YEAR(TODAY()),4,24),
'7/31', DATE(YEAR(TODAY()),5,25),
'8/31', DATE(YEAR(TODAY()),6,25),
'9/30', DATE(YEAR(TODAY()),7,25),
'10/31', DATE(YEAR(TODAY()),8,25),
'11/30', DATE(YEAR(TODAY()),9,24),
DATE(2222,12,22))

 

Error: Compiled formula is too big to execute (5,353 characters). Maximum size is 5,000 characters

 

 Hello,

 

I am very new to APEX trigger writing and I am having this error.

 

My intention:

Basically when a user enters a new flight hours on the custom object Flight_Hours__c, and when the user also selects a checkbox called Update_Equipment_Last_Hours__c, that the trigger then references the related Equipment__c and updates that Equipments last hours.

 

My code:

trigger UpdateLastHours on Flight_Hours__c (after insert) {

 

for (Flight_Hours__c j : trigger.new)
    {
        If (j.Update_Equipment_Last_Hours__c = True)
        {
            j.Hours__c = j.Equipment__r.LastHours__c;
            j.Hours_Date__c = j.Equipment__r.LastHoursDate__c;
        }

    }

}

 

My error:

 Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger UpdateLastHours caused an unexpected exception, contact your administrator: UpdateLastHours: execution of AfterInsert caused by: System.FinalException: Record is read-only: Trigger.UpdateLastHours: line 7, column 13

 

Any help would be greatful, and please excuse the noob if this is super simple :)

 

Thanks,

 

James

I'm having some odd issues once in a while with either a trigger or a workflow rule not running correctly. Not exactly sure what's going on at the moment, but solving the problem is not my question for here.

 

What I'm wondering is, is there a way to capture a log of what happens within an organization for some period of time?  I believe I can capture a DEBUG log for a single user, but is there anything that would allow me to capture the data for all users?  I'm not going to get the information I want unless I know all the triggers and workflows that are running regardless of user.  I'd be happy to limit it to a certain object type (ie, Leads) if that was needed, but single users aren't going to work (unless I can capture the data in multiple single user DEBUG logs).

I am trying to create a formula that will check the values (multi select) in the account object, as they would relate to a single value in  the Opportunity object.  I have 82 values in my multi select list to compare between the account and the opportunity.  here is a sample scenario,

 

Franks Auto Sales is my Account

Boston exists in my auction field in the opportunity.

Registered Auctions field is in the Account object (Multi Select)

 

When this account becomes registered with Boston, meaning that Boston would be included in the registered auction field, the Opportunity stage would be updated to Closed Won.

 

  • November 18, 2010
  • Like
  • 0

Here are my steps:
1. Take in a username and password from a Visualforce page.
2. With Apex, I'm encrypting the password using the following function.


private string Encrypt(string preHashValue){
       Blob bPrehash = Blob.valueOf(preHashValue);
       Blob bsig = Crypto.generateDigest('SHA1', bPrehash);

       return EncodingUtil.convertToHex(bsig);        
}

 

3. This gives me a 40-digit hex number.

4. I store that number in Salesforce.

Now the problem:

 

Currently, I've got an encrypted (SHA1) password in my SQL database that I want to compare to the encrypted password in Salesforce.
The issue is that these values, after encrypting the same plaintext password, are not the same.

After some digging, I've found that when the SQL stored procedure is encrypting the plaintext password, it's storing it as an nvarchar(255). Then encrypting it using       HashBytes('SHA1',@Password)

So,

       HashBytes( 'SHA1', Cast( 'TestPassword' as nvarchar(255) ) )

and
       HashBytes( 'SHA1', 'TestPassword' )

give two different values.

My Question:
Is there a way to encrypt the value in Apex so that it matches the encrypted nvarchar(255) in the SQL database?

Any help would be greatly appreciated,

Greg

I have created the following BulkApex to count the number of accounts owned by users.

 

This works, however it does not work for our larger account owners where it hits governor limits. To combat this i have put in a LIMIT 5000, however we have many owners with more than 5k accounts and i would like to get an accurate count.

 

        List<User> users = new List<User>();
        Set<ID> UserIDs = new Set<ID>();
        for (Sobject c : scope) {
                UserIDs.add(c.Id);
        }       
        Map<ID, User> usersWithAccounts = new Map<ID, User>([select Id, Accounts_Owned__c  FROM User WHERE  Id in :UserIDs]);
        Map<ID, Account> acctsCount = new Map<ID, Account>([select Id, OwnerID FROM Account WHERE OwnerId in :UserIDs LIMIT 5000]);
        
        for (User acct : usersWithAccounts.values()) {
            Set<ID> conIds = new Set<ID>();
            for (Account con : acctsCount.values()) {
                if (con.OwnerID == acct.Id)
                    conIds.add(con.Id);
            }
            acct.Accounts_Owned__c = conIds.size();        
        }
        update usersWithAccounts.values();

    }
 global void finish(Database.BatchableContext BC){
    }
}

I have tried to do variation on 

Map<ID, Account> acctsCount = new Map<ID, Account>([select Id, OwnerID FROM Account WHERE OwnerId in :UserIDs LIMIT 5000]);

 

To use COUNT(), COUNT(ID) instead of the size so it will run for all users.

 

I have taken this script from another similar process for counting contacts on the account, so that is the basis for the way it has been contstructed, I am very new to Apex.

Any hlep much appreciated.

 

  • November 18, 2010
  • Like
  • 0

Hello all,

I hope somebody can help me with this question or point me in the right direction.

I'm a total newbie to SalesForce but am leaning as quickly as I can by at least searching the web first.  But on this time I can’t seem to work out what to do.

Firstly I have created a custom object called "timesheet" in that object I have two custom fields first field is “start time” and the second is “finish time” at the moment I’m currently using date and time but I would like to just have the time there displayed.  Also I would like to have a third custom field to calculate the time difference, is there formula that can do this? I would also like this field to display the length of time in hours and minutes if possible.

 

Thanks in advance.

I am trying to send attachments from salesforce to our other crm system.  My first question is does salesforce support sending attachments with outbound messages?  If yes how can I convert it to base64 before it enters our webservices gateway server?  If no then I need to make a call to salesforce and get the attachment but I still need to convert it to base64 before the message comes thru our gateway server.  The current version of OWSM does not support attachments.  Thanks

 

noreaster

Guys im trying to do something quick, simple, yet complex to me.

 

I want to create custom button that will change the "lastmodified to current user and Today()" /  or Open/Save the document so its been classified as updated to trigger workflow process.

 

either that or i would like to create a trigger so that when a new NOTE is created for a record, the record updates the last modified date.

 

Any ideas would be awesome

 

cheers

 

Jason

Hi,

 

I just wanted to know that is there any way to deactivate the trigger in production.. forcefully

Hi,

 

In Case, we are having the Account Lookup field. In the same way I have created a contract lookup field. Now I want the related contracts only to be displayed in the lookup for that specific Account.

 

Is there any way to achieve this? If so then give me some example.

 

Thanks

Raj

We're cloning a custom quote object record with a button that references an Apex Class.  Currently the clone button results in creating a cloned record with the default record type.  I would like to specify that the record type of the original record is also the record type of the cloned record.

 

Is this possible?

  • August 25, 2010
  • Like
  • 0

Is it possible to mark an email as bounced any other way than the email bouncing? I have a check box in my contacts with 25,000 bounced emails, but I want to populate the "email address" field with the regular indicators that the email has bounced.

Thanks for your help!

  • August 25, 2010
  • Like
  • 0

Hi,

can somebody help me out where can i get the xml schema code for the ups integration shipping WSDl.

 

thank you

 

 

  • August 25, 2010
  • Like
  • 0

A Opportunity Product has a Start date.

 

If a Product Opportunity has Revenue and Quantity schedules can you make the dates dependent on the Opportunity Product Start Date.

 

So, if the Product Opportunity Start Date is changed, all the schedule dates change automatically.

 

For Example  Product Opportunity Start Date - 8/24/2010

 

Schedule dates are set over 3 installments starting on 9/01/2010, 10/01/2010 and 11/01/2010

 

If the Product Opportunity Start Date is CHANGED to 9/24/2010, can the schedule dates automatically change to 10/01/2010, 11/01/2010 and 12/01/2010?

 

Thanks, Mike.

I've been seeing this more and more, the auto-complete / code assistance system for APEX in the Eclipse IDE often dosn't work. Even when I try to force if (CTRL+SPACE) i just see an empty list rather then the properties and methods of the object I'm working on.

 

Any ideas? Or is this a known issue?

Hi,

 

I have one standard opportunity page layout, and on that page layout itself i need a button to upload a file, while page is in editable mode.

 

i have created a custom link and using that link i can attach a file, and that link is even getting displayed on the page layout. But gets disappear while the page is in editable mode.

 

Please suggest if there is any possible solution for this.