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.

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.