updated how the http endpoint is generated for createRecord (in complex situations)