0 votes

Hi,
I created a custom field in Prod_Oppo and when i try to get some information from it the debugger says that the field can not be found.

enter image description here

I tried to do the same with other functions and then it was possible to get the field, but not in the way how i want to do it.

enter image description here

Maybe a thing to keep in mind is that i created some custom fields and deleted them with same name. I don't know if this is the problem but it can be...

Also when i look at the database and the sys_fields everything looks fine.

Thanks in advance,
Bart

asked in WorkFlow / Serverscript by (106 points)

1 Answer

+1 vote

Based on the first comment in your code, it looks like EditHandle is from a Document context

// Update F_CURRENCY in DOCUMENTS from OPPORTUNITIES

So, I assume you are trying to update DOCU_PROD instead of OPPO_PROD

Tip
Instead of using the EditHandle and DS variables, declare them more specific. This will help you.

var editOppo, editDocu,
dsOppo, dsDocu

A false comment is worse than no comment.

Off topic:
Note that the coding rules are to use camelCase, you are mixing up everything.
Avoid catching errors and then doing nothing with the exception. If the operation fails, you really want to see that.

answered by (6.9k points)
1,173 questions
1,433 answers
1,726 comments
325 users