+ Start a Discussion
Omega3kOmega3k 

Urgent Help Needed - Force.com IDE Deployment

Hi Everyone,

 

I was wondering if someone can help me with the errors I'm experiencing trying to deploy a package using the Force.com IDE to a trial org I have set up:

 

Failures:

   objects/Case.object

                Case.Adverse_Event : Picklist value: Twitter in picklist : Origin not found

                Case.General_Request : Picklist value: Twitter in picklist : Origin not found

                Case.Medical_Inquiry : Picklist value: Twitter in picklist : Origin not found

                Case.Samples_Request : Picklist value: Twitter in picklist : Origin not found

                Case.Product_as_per_Speciality_for_Sample_Req : Field Specialty_1_vod__c does not exist. Check spelling.

 

Here's the code surrounding the errors in the Case object:

 

<picklistValues>
            <picklist>Origin</picklist>
            <values>
                <fullName>Email</fullName>
                <default>false</default>
            </values>
            <values>
                <fullName>Phone</fullName>
                <default>false</default>
            </values>
            <values>
                <fullName>Twitter</fullName>
                <default>false</default>
            </values>
            <values>
                <fullName>Web</fullName>
                <default>false</default>
            </values>
        </picklistValues>

 

<validationRules>
        <fullName>Product_as_per_Speciality_for_Sample_Req</fullName>
        <active>false</active>
        <errorConditionFormula>AND(RecordTypeId = &apos;012A0000000lXFv&apos; ,
    AND( TEXT(Product__c) =&apos;Praxil&apos; , TEXT(Account.Specialty_1_vod__c)  &lt;&gt; &apos;Cardiovascular&apos;) ,
    AND(TEXT(Product__c) =&apos;Dilaclor&apos; ,  TEXT(Account.Specialty_1_vod__c)  &lt;&gt; &apos;Oncology&apos;),
    AND(TEXT(Product__c) =&apos;Varwiz&apos; ,  TEXT(Account.Specialty_1_vod__c)  &lt;&gt; &apos;Respiratory&apos;),
    AND(TEXT(Product__c) =&apos;Quivliax&apos; ,  TEXT(Account.Specialty_1_vod__c)  &lt;&gt; &apos;Rheumatology&apos;),
    AND(TEXT(Product__c) =&apos;Ruvizah&apos; ,  TEXT(Account.Specialty_1_vod__c)  &lt;&gt; &apos;Vaccines&apos;)
)</errorConditionFormula>
        <errorMessage>Select Product base on Specialty
If Product = Praxil, Then = Cardiovascular; If Product = Dilaclor, Then = Oncology, If Product = Varwiz, Then = Respiratory, If Product = Quivliax, Then = Rheumatology, If Product = Ruvizah, Then = Vaccines</errorMessage>
    </validationRules>

  

Any help would be greatly appreciate!

 

Thanks a lot!

 

r_boyd_848r_boyd_848

Hi. I think the problem lies here

 

RecordTypeId = &apos;012A0000000lXFv&apos;

The id of the Record type will be different in the target org. You need to query the RecordType object to get the Id's. See http://wiki.developerforce.com/index.php/Apex_Code_Best_Practices Tip 10.

 

//Query for the Account record types

      List<RecordType> rtypes = [Select Name, Id From RecordType
                   where sObjectType='Account' and isActive=true];

 

By the way if  you plan to use the above code with custom objects in a managed package leave out the sObjectType= in the WHERE clause as the Namespace is not appended. Typically you don't have that many record types.

 

where sObjectType='myCustomObject__c' works in an unmanaged package but will fail in a managed package