You need to sign in to do that
Don't have an account?
Stephen Bunda
Trigger to populate Account lookup based on a account number.
Hi. I'm completely new to triggers and need some help. I want to use the Standard "Orders" object to populate orders for an account. We are pulling in account data automatically from an external dataabase using a jitterbit integration. We will also be feeding the order object via the same ETL tool and a different database table.
The indexed field on the account is the "Account Number" field. What I am trying to do is based on teh account number on the order feed is populate the account lookup with the account that matches the account number. I would like a trigger to do this but I know nothing about writing triggers.Any help would be appreciated.
The indexed field on the account is the "Account Number" field. What I am trying to do is based on teh account number on the order feed is populate the account lookup with the account that matches the account number. I would like a trigger to do this but I know nothing about writing triggers.Any help would be appreciated.
Use the below trigger. Use your account number fields API name instead of Account_Number__c on Order and Account. Let me know, if you need any other help.
Thanks,
Neetu
All Answers
Use the below trigger. Use your account number fields API name instead of Account_Number__c on Order and Account. Let me know, if you need any other help.
Thanks,
Neetu
Invalid Field AccountNUmber for SObject Order
AccountNumber is not standard field on Order, it must be AccountNumber__c, change the field name with this and try again. If you still faces the same issue then will it be possible for you to share your salesforce org login credentials on that I can have a look into the issue. You can contact me either on my gmail id: neetu.bansal.5@gmail.com or Skype id: neetu.bansal.5
Let me know, if you are able to fix this.
Thanks,
Neetu
So I'm a bit confused.
Thanks,
Neetu
Here is a list of the standard fields on the Order object:
Here is what it looks like when I click on "Edit" next to Account Number
And here are my custom fields:
So, I can't change the name of that field. If I need to create a custom field in order for this to work that's not a problem. I was just curious if it would work with a standard field.
I tried to save this trigger in my free developer org and its strange that I'm also getting the same error although the field is visible to all the profiles. I am still analysing and will let you know once I know the reason.
In the meantime, you can log a case to Salesforce regarding the same.
Thanks,
Neetu
You need to create test class for this trigger to move this to production, If you need any help, you can contact me anytime.
Thanks,
Neetu
Thanks,
Neetu
I would not mind helping with test class, Please contact me on any of my personal id gmail: neetu.bansal.5@gmail.com or Skype: neetu.bansal.5 to share your requirement.
Thanks,
Neetu