refill()
and
relen()
both are async calls. You're trying to set the values in your first call. Hence,
$('#TxtOrganization').val(result.RelationshipId);
$('#ddlRelationship').val(result.RelationshipId);
Write this code in your
relen()
success, after data is bound to dropdown.
Pass
result.RelationshipId
as a parameter to relen().
KR