'Cannot insert the value NULL into column' Error With PK and FKs in Insert Statement

I have the following script I'm attempting to run, but I keep getting the NULL error. The primary key is ID, which is not included in my script.

I'm not the owner of the table, so I cannot make any changes in the Key folder.

I also need to point out that UserID and EntityID are foreign keys in the Userpermissions table.

How can I get this script to run successfully without any NULL or key constraint errors?

INSERT INTO userpermissions (
        UserID, 
        EntityID, 
        Applications, 
        Phone, 
        PhoneExt, 
        E_Mail, 
        UserTypeID, 
        InactiveDate, 
        ReviewDate)

VALUES( ( SELECT ID FROM Users AS UserID WHERE id = 710231),
        ( SELECT ID FROM Entity AS EntityID WHERE id = 2332448),
        '31525197392643072' ,
        'NULL'  ,   
        'NULL'  ,   
        'NULL'  ,   
         2      , 
        'NULL'  , 
        'NULL'  
       )

Likely one of the two subqueries

( SELECT ID from Users as UserID where id = 710231), ( SELECT ID from Entity as EntityID where id = 2332448)

returns NULL


My guess is you're trying to insert the string `'NULL' into the date fields, which do not accept non-date values. Remove the single quotes:

INSERT INTO userpermissions (
        UserID, 
        EntityID, 
        Applications, 
        Phone, 
        PhoneExt, 
        E_Mail, 
        UserTypeID, 
        InactiveDate, 
        ReviewDate)

VALUES( ( SELECT ID FROM Users AS UserID WHERE id = 710231),
        ( SELECT ID FROM Entity AS EntityID WHERE id = 2332448),
        '31525197392643072' ,
        NULL  ,   
        NULL  ,   
        NULL  ,   
        2     , 
        NULL  , 
        NULL  
       )