Hi Experts,
Can anyone tell me how to hardcode a field in the customer table called Global dimension code 1 to 300. I tried Writing this in the onaftergetrecord trigger but it give me an error.
This hardcode is to be done on a report with customer as the dataitem.
"Global Dimension 1 Code" := 400;
The Error is:
Type conversion is not Possible because one of the Operators contains an invalid type Code := Integer
Any suggestion to slove this please.
Thanks
Comments
instead of 400 like a number - try '400' with the quotes.
*assuming "400" is an actual dimension code.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I expect to run this report with only Customers with Global Dimension 1 code value to be 400 even without filtering.
The error has stopped but i have not achieve what i want.
What might be the problem?
Thanks.
why not View->Properties of the dataitem you are using then set the property
DataItemTableView : WHERE(Global Dimension 1 Code=FILTER(400))
:?:
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks.
Thanks savatge, this works. Can this be hardcoded? I want it hardcoded, because i will be filtering receiveble accounts. As it is right now, if i set another filter it does not show anything.
my aim is to have the report filter where Global Dimension Code 1 = '400'
and Receivable account = '14620'
Can we have it hardcode? any idea.
Thanks.
RIS Plus, LLC
Also what do you mean it does not show anything if you set another filter.
First off setting that property to 400 will only show customers with 400 as their GD1C. now if you have (for example) 100 customers with 400 then only the 100 will show but you can still filter on those 100 using other fields.
Like which customers have the same contact or have the same salesperson or have the same terms or have a name that starts with W*....etc etc etc. once you set that property to 400 you can't use that Global Dimension 1 for any other option 100, 200, 300 , 500. it's SET @ 400!
I don't know what the Receiveable account is but I guess it would look something like this:
WHERE(Global Dimension 1 Code=CONST(400),Customer Posting Group=CONST(14620))
http://www.BiloBeauty.com
http://www.autismspeaks.org
This is exactly what i want. I want the report to filter by
Global Dimension 1 Code=CONST(400) and also
Customer Posting Group=CONST(14620))
This should display all customer that have satisfy the above. i want it to filter by GD1C and then filter among GD1C by Customer Posting Group.
I have set the dataitemtableview to the above two conditions but when i run the report, It becomes blank. i.e report generated completed(0 pages).
i don't know what the problem is but these are the two conditions that should give me the results
Sorry, i am very new in Navision, so when i say hardcode i though i can be done using the C/AL code only. Now i have understood and have learnt.
Any suggestion again please!!!
Thanks.
this should work
1)change CONST to FILTER to seeif it makes a difference
2)are you sure you have customers that actually satisfy these conditions
3)are you setting some other filters somewhere with code?
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC