i hope you can help me.
The Sales organization field (Lookup field) should be dependent on two fields. First the field Company code and second the Division.
I have already created a list for the dependency of Company code and Sales organization and stored it in the filter for Sales organization.
This is my lookup list:
But how can I make it so that the division is also depending on this? The division itself is not dependent on the company code.
As an example, for the company code 1650 and for the Cement division only 1650 and 1659 should be displayed in the Sales org.
function filterSales() {
//use fields' internal names
var companycode = fd.field('Company_x0020_code_x0020_lookup').value;
var divisioncode = fd.field('Division_x0020_lookup').value;
Then, you can save the selected option to a SharePoint field. You can find the instructions and the code sample in the Change drop down field data source article.
Sorry for asking but would it also be possible to display Division based on the selection of the Company code?
For example, the Company code of Germany should only show concrete at Division. For Poland then cement and concrete.
You are using the invalid internal name of the column. Go to the source list, open the list settings, find the Company code column and open its settings. The page URL contains the valid column name.
If you are not sure, please share the screenshot of the column settings page with its URL and the column type:
The error that you've shared indicates that the 'Company_x0020_code' column doesn't exist in the source list.
Have you renamed that column?
Try to comment out all custom code and remove all lookup fields except 'Divison_x0020_lookup' from the form if possible. Leave the 'Divison_x0020_lookup' field settings as is and check if the error persists: