• Jamil Vallis-Walker
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 6
    Likes Given
  • 1
    Questions
  • 2
    Replies
I am trying to load a csv file (encoded as UTF-8) into the salesforce Data Loader. One of the values in the csv file is a string reading "Biotechnology & Science". When I try loading the csv file, I receive the following error.
bad value for restricted picklist field: Biotechnology & Science
I have referenced Salesforce knowledge articles such as this, but none have helped. I have tried checking off the Data Loader's "Read all CSVs with UTF-8 encoding" checkbox but it does not resolve the issue. Manually enclosing the value in double quotes (") does not help either.
The csv file when opened with Notepad shows the following:
False,3,Biotechnology & Science,Jacksonville University,
(This is only a snippit of the data but coveres the value discussed)

I am creating the csv file via a Python 3 script using the Pandas .to_csv() method, which defaults encoding to UTF-8. I am operating on a Windows 10 computer.

Any help would be greatly appreciated!
I am trying to load a csv file (encoded as UTF-8) into the salesforce Data Loader. One of the values in the csv file is a string reading "Biotechnology & Science". When I try loading the csv file, I receive the following error.
bad value for restricted picklist field: Biotechnology & Science
I have referenced Salesforce knowledge articles such as this, but none have helped. I have tried checking off the Data Loader's "Read all CSVs with UTF-8 encoding" checkbox but it does not resolve the issue. Manually enclosing the value in double quotes (") does not help either.
The csv file when opened with Notepad shows the following:
False,3,Biotechnology & Science,Jacksonville University,
(This is only a snippit of the data but coveres the value discussed)

I am creating the csv file via a Python 3 script using the Pandas .to_csv() method, which defaults encoding to UTF-8. I am operating on a Windows 10 computer.

Any help would be greatly appreciated!

Hi all -


I'm struggling with how to set a date field to today() using a custom button's on click javascript.

 

I'm using the button to set the value of two picklist values, set a date field to Today() and set a second date field to Today()+180.

 

When I first wrote it and tested it earlier in the week, it was executing but was setting the wrong dates. Today it just errors out.

 

 

{!requireScript("/soap/ajax/13.0/connection.js")} var QR= new sforce.SObject("Quote_Request__c"); QR.id = "{!Quote_Request__c.Id}"; var temp_dev_date=new Date(); temp_dev_date.setDate({!TODAY()}) var temp_val_date=new Date(); temp_val_date.setDate({!TODAY()}+180) QR.Delivered_Date__c=temp_dev_date; QR.Validity_Date__c=temp_val_date; QR.Customer_Requirements__c="Test update of auto close button."; QR.Status__c="Closed - Completed"; QR.Stage__c="Delivered"; var result = sforce.connection.update([QR]); if (result[0].getBoolean("success")) { // Refresh window window.location.reload(); } else { alert("something broke"); }

 

Appreciate any guidance or other approaches that could be used to accomplish this.

hello all,
i have having issues with this challange and am not sure how to get past them ...below is a screen capture of the challange and my latest error.Challenge and issue

here is the code i have ...
==================
public class AccountHandler {
    
    public static Account insertNewAccount(String AcctName) {
        
        Account acct = new Account();
        if (AcctName <> ''){
            acct.Name = AcctName;
            return acct;
        } else {
            return Null;
        }
    }
}
===============

i have already started a new Development Environment to try and get rid of the "org" related issue, but this did not help .. obviously i am doing something very basic wrong ... 
HELP
thank you
rica

Hi,

 

Is there a way we can add a time to now()?

 

My present time is 4/26/2011 6:43 PM.

I have a text formula as "TEXT(NOW())", but I am getting a result of "2011-04-26 10:43:51Z" which is 8 hours late hence i would like to add 8hours to my formula.

 

Also, is it possible to format the result exactly the same as "4/26/2011 6:43 PM"?

 

Thanks a lot.

 

Del

                         

I am using a custom object which is a child of the account object.

 

If I run this query:

 

Select a.Name, (Select Partner_Research_Name__c, Partner_Research_URL__c From Partner_Research_Records__r) From Account a

 

I get a list of all accounts some of which contain a record Partner_Research_Records__r that is blank, and others (when the object is present in the parent object) a set of values.

 

I want to add something to the where clause that will filter out any responses where the Partner_Research_Records__r recordset is null, however I can't seem to figure out the proper syntax.

Hi,

 

- Sorry to bother, but I found no answer to this wuestion either on the web, or in the dev forum, or in the Apex documentation - 

 

I have a trigger, which detects error conditions and feeds errors to the class or field.

This gives a nice result interactively, in the GUI.

But how do I write test code to catch these errors ?  Is there a System.AssertException(), or the equivalent ? 

 

trigger createOrder on Asset (after insert, after update) {[...] if (price.get(a.Product2Id) == NULL) { System.debug(' error : no active price'); a.Product2Id.addError('no active price on the Product'); }[...]}

 

 

 

  • August 31, 2009
  • Like
  • 1

I'm trying to copy a new user as contact by using a trigger but I'm getting the following error

 

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Contact, original object: User

 

trigger Acceleration_User_Copyto_Contact on User (after insert, after update) {
    
   // Map<String,User> newLead = new Map <String, User>();
    
    system.debug('Acceleration_User_Copyto_Contact Trigger....');
 
    for ( User user : System.Trigger.new)
    {
        if  (user.Email.contains('acceleration'))
        {
            system.debug('Acceleration_User_Copyto_Contact Trigger..2.');
            Integer RecordCount = [select count() from Contact c where c.Email = : user.Email];
            
            system.debug('Acceleration_User_Copyto_Contact Trigger..2a .' + RecordCount);
            
            if (RecordCount == 0)
            {
                String AccountId = '';
                for ( Account a : [Select a.Id From Account a where Name = 'Acceleration']) 
                {
                    system.debug('Acceleration_User_Copyto_Contact Trigger..3.');
                     
                    AccountId = a.Id;
                
                    Contact con = New Contact();
                    con.AccountId = AccountId ;
                    con.Email = user.Email;
                    con.Firstname = User.Firstname;
                    con.Lastname = User.Lastname ;
                    con.User__c = User.Id;
                    insert con;
                }          
            }                   
        }
        
     }
    
    
}

 

Hi,
I want to write a query like this:

select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c='Allow Relationships To Be Created' and Account__r.Name not like 'Test%'.
 
The above query throws SOQL exception.
 
It works and runs when I remove the NOT operator as shown below:

select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c='Allow Relationships To Be Created' and Account__r.Name like 'Test%'
 
My questions is: Does SOQL support "NOT LIKE" operator. If no, then what is the alternative to achieve a similar operation.
 
Thanks for all your feedbacks.
Ambili
  • October 16, 2007
  • Like
  • 1