0

I'm getting a daily CSV file. It contain the Customer Id(created on cotnact obj).

Now I've to import the CSV file data in salesforce automatically.

But to create a new record on Assest object we need to feel either Account or contact field. otherwise we can't save.

but we can not put account Id or contact id in CSV file. We can write a trigger to update contact field on Asset obj based on Customer Id value.

But we are unable to save because of standard validation rule. So how to avoid this.

Is any way. Please guide.

1 Answer 1

0

No, you must have either an account or contact to associate to. This is a standard system validation and cannot be violated. Also, triggers execute after standard validations have occurred, so you cannot circumvent this with code. However, if Customer ID is set as an External ID, you can match the asset by using the Customer ID using the SOAP, REST, or Bulk APIs. As long as you provide a valid External ID value, your upload will be okay. Please check the relevant documentation for the API you're using for how to map an External ID to the look up field.

1
  • Thanks. Instead of creating all those and Still Asset object is not much useful. Thus I'm creating a custom object.
    – Amol
    Aug 23, 2017 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .