In the calling Function need to Mention the” ExecutionContext” along with the parameter.
If you are not mention then it reads the parameters as “OBJECT”
Note: If you want to pass more than one value then separate the attribute values with Semicolons
On load Code:
var name = Xrm.Page.data.entity.attributes.get(Name).getValue();
// Or you can fetch the value using the following Way
var valuFromContext = ExecutionContext.getEventSource().controls.get(Name).getAttribute().getValue();
In Onload Function call , follow the below image.