Rollup Field Decimal throwing error - dynamics-crm

I´ve got a rollup field calculating a decimal value, its working fine, but when i recalculate it im getting an error message.
None of the values being calculated are null nor another type.
Thanks for your help!

Related

A validation error occurred in dynamics-crm

In my code, I insert from one date field to another date field, then update my entity with the new data and debugging my code. I get this exception:
A validation error occurred. The value of on record of type is outside the valid range.
When I change the same field in CRM UI I get no error. Where should I look for? What is the problem?
Normally this error will look like:
A validation error occurred. The value of 'field_name' on record of type 'entity_name' is outside the valid range.
You have to make sure, if the field is optionset - then the value (ex.10000000) passed in code is within the available range of options in optionset customization (ex: 10000000, 10000001, 10000002)
You said date field, verify if the date fields between the entities are of same type (like date only, date time, timezone specific, etc). Also the retrieval from CRM using SDK will give you UTC whereas the date value assignments in code while create/update will be parsed to UTC.. check that too for possible date range like 31st November 2017.

getUserBy() phpfox

During working I faced a very weird thing in phpfox script
I put in the table user a new field .. and this field is tinyint with default value 0 and started to work on giving the user the ability to insert the value through links and finally it's succeeded but when I tried to get this value by getUserBy('name_of_the_field') it gave me a null value although I checked it in the database table and found that field has a value ... so could you help me please ?!
The getUserBy() does not get every field in the user table, there is a predefined list of columns that it will fetch.
You will need to get this field in a different way or write a plug-in to the hook "user.service_auth___construct_query" so it loads your new field, I have not tried this but I believe it should work as a plug-in to that hook:
$this->database()->select('u.my_new_field,');

Getting DataTable column names using linq, error when column is null

I have a datatable with n columns & I am converting it to Pivot.
I already have a piece of code for converting it to Pivot, reference :
Adding Sum per row in PIVOT using LINQ
Now problem comes when there is a column with null values in it.
following line fails with error
dtPivot.PrimaryKey = dtPivot.Columns.Cast<DataColumn>().ToArray();
Error : Column 'x' has null values in it.
Can any one help me, how to handle this...
I'd start by looking at what exactly is causing the issue.
Add a breakpoint before the line, and see what items are contained in dtPivot.Columns (you can try to use ToArray()).
Are there items which are null or are there items with properties which are null that's causing the problem? You can check this by using the watch in the debugging window to try and cast an item from dtPivot.Columns manually to DataColumn, and see which ones throw errors (and possibly, WHY they throw errors).
If the error is because some of the items in dtPivot.Columns are null, then you could try and filter them out first using Cast<object>().Where(o => o != null). If the error is because a property is null, then see if there isn't anything else you could cast the columns to first, and then try to filter the columns (or fill out the missing values, if need be).

Error in retaining an invalid value for date fields in form

I am relatively new to the Spring framework and am facing a problem that I am not sure where I am going wrong.
I have a form with two date fields, date 1 and date 2. If date 1 field is an invalid date and the date 2 is a valid date, when validations are performed, the date 1 field's invalid value is not displayed. Instead the date 2 value is populated in the date 1 field box.
Could someone please tell me why and where I am going wrong.
I believe this is a framework error with the way I have configured spring and not a problem with my code. I tried debugging through my code and it works as it is supposed to.
I had the same issue. It looks like you are using a customDateEditor that is different from the one that Spring provides. Check if you are importing
org.springframework.beans.propertyeditors.CustomDateEditor
in your customPropertyEditorRegistrar class... It will probably help.

Convert big int VBA

Im having to edit code in very old classic asp.
Im comparing two values.
I am getting an error saying Type mismatch
This is where it occurs:
if oRsDropDown(id_col) = variable then
the drop down is created form a sql execution
I think the issue may be that the ID column in the db being compared is a big int?
Without knowing the type that oRsDropDown returns, does it work with is?
if oRsDropDown(id_col) is variable then

Resources