Hi,
I hope you have followed the blog mentioned by you.
Since the actual issue seems to be in getting the lookupItems, try with this code:
var windowcrmform = window.parent.document.all["crmFormSubmit"];
var lookupItems = LookupObjects(null, "multi", params.gridTypeCode, 0, null, "¤tid=" + CrmEncodeDecode.CrmUrlEncode(windowcrmform.crmFormSubmitId.value) + "&ShowNewButton=0", 1, null, null, null, null, null, viewId, [customView], null, null, null, null, 1, null, 1);
This is the complete syntax for the lookupItems which you can modify as per your need.
Let me know in case you need more help to get the data upto associating the selected record to the grid.
I hope this helps to resolve your query.
Thanks & Regards,
Anubhav Bajpai