Error :Cannot convert null to an object

sainath3
Mega Guru

Hi Team,

 

Am facing one issue while converting Currency from MOP to EUR.

I have checked : MOP Record is available in fx_currency_instance table.

I am able to convert currency from other to EUR except MOP.

Please find the below screenshot for your reference.

find_real_file.png

Help me out form this please.

 

My Code is in below screenshot.

find_real_file.png

 

AND one more issue is there are total 500 records need to convert but execution is getting stop when this king of error comes, I don't want to stop execution can you please tell me how i can handle this situation.

2 REPLIES 2

Matt102
Giga Guru

Hi,

I suspect you need more in your if, to determine if you have a value or not?

the following (in background script) gets me "monies not null"

var monies;
if (monies != 'null') {
gs.info('monies not null');
} else {
gs.info('monies is null');
}

I'll dig, I'm sure I done this before.

hth,matt

The following gives "monies is null"

var monies;
if (monies) {
gs.info('monies not null');
} else {
gs.info('monies is null');
}