• Brian Ko
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hey all,

I'm trying to use Apex Trigger to populate a Shipping Address from the Billing Address if no Shipping Country is provided. However, I have a validation rule in place that requires the Shipping Country to be filled out before Account creation. From what I read, before triggers should fire before validation rules. However, I keep getting the validation rule error message when trying to create an Account with a Billing Address but no Shipping Address.

Here's the code:
trigger AccountShippingAddressUpdate on Account (before insert) {
    for (Account a : trigger.new)
    {
        if(a.ShippingCountry == '')
        {
            a.ShippingCity = a.BillingCity;
            a.ShippingCountry = a.BillingCountry;
            a.ShippingCountryCode = a.BillingCountryCode;
            a.ShippingState = a.BillingState;
            a.ShippingStateCode = a.BillingStateCode;
            a.ShippingStreet = a.BillingStreet;
            a.ShippingPostalCode = a.BillingPostalCode;
        }
    }
}

Thanks in advance!
Hello,

I am trying to uninstall a managed package. I've solved all of the other errors related to uninstalling the package. However, the one that I can't figure out is where it says the following:

Component Type: Package
Name: ServiceMax
Problem: This extension depends on the package you are trying to uninstall. CreateWOfromLocation

CreateWOfromLocation is an Apex Class that I had but had to remove in order to uninstall ServiceMax (I was getting error messages that I couldn't uninstall because of that Apex Class).

I can't go into the package because it tells me that my Production organization is not the one that installed the package. None of the sandboxes I have can access it too.

I'm not sure what I'm doing wrong.

Thanks,

Brian
Hello,

I am trying to uninstall a managed package. I've solved all of the other errors related to uninstalling the package. However, the one that I can't figure out is where it says the following:

Component Type: Package
Name: ServiceMax
Problem: This extension depends on the package you are trying to uninstall. CreateWOfromLocation

CreateWOfromLocation is an Apex Class that I had but had to remove in order to uninstall ServiceMax (I was getting error messages that I couldn't uninstall because of that Apex Class).

I can't go into the package because it tells me that my Production organization is not the one that installed the package. None of the sandboxes I have can access it too.

I'm not sure what I'm doing wrong.

Thanks,

Brian
Hey all,

I'm trying to use Apex Trigger to populate a Shipping Address from the Billing Address if no Shipping Country is provided. However, I have a validation rule in place that requires the Shipping Country to be filled out before Account creation. From what I read, before triggers should fire before validation rules. However, I keep getting the validation rule error message when trying to create an Account with a Billing Address but no Shipping Address.

Here's the code:
trigger AccountShippingAddressUpdate on Account (before insert) {
    for (Account a : trigger.new)
    {
        if(a.ShippingCountry == '')
        {
            a.ShippingCity = a.BillingCity;
            a.ShippingCountry = a.BillingCountry;
            a.ShippingCountryCode = a.BillingCountryCode;
            a.ShippingState = a.BillingState;
            a.ShippingStateCode = a.BillingStateCode;
            a.ShippingStreet = a.BillingStreet;
            a.ShippingPostalCode = a.BillingPostalCode;
        }
    }
}

Thanks in advance!
Hello,

I am trying to uninstall a managed package. I've solved all of the other errors related to uninstalling the package. However, the one that I can't figure out is where it says the following:

Component Type: Package
Name: ServiceMax
Problem: This extension depends on the package you are trying to uninstall. CreateWOfromLocation

CreateWOfromLocation is an Apex Class that I had but had to remove in order to uninstall ServiceMax (I was getting error messages that I couldn't uninstall because of that Apex Class).

I can't go into the package because it tells me that my Production organization is not the one that installed the package. None of the sandboxes I have can access it too.

I'm not sure what I'm doing wrong.

Thanks,

Brian
This URL works fine w/ my enterprise users but not so with my community users as they have "sales/" at the beginning of their relative URL. In theory this works, except the forward slash is being encoded to %2F. Does anyone know of a way to suppress/disable encoding the forward slash? If not, what is the next easiest way to implement this requirement of custom URLs that work with both enterprise and community users.

/{!IF( User.Profile="Sales (Part Comm)", "sales/" , "")}a1Y/e?
&CF00N9000000AnnSN={!Opportunity.CurrentDraftPOName__c}
&CF00N9000000AoDJR={!Opportunity.Name}
&00N9000000AnnUT={!Opportunity.Contract_Calc_Roof_Material__c}
&RecordType=012900000009E07
&retURL=%2F{!Opportunity.Id}
&saveURL=%2F{!Opportunity.CurrentDraftPOID__c}