Jeff...
Unfortunately, I am not understanding something about how to grab the data for a view/edit page. Just as I thought I was understanding all this, my head blew up!!
If you recall, you helped me with a list page on an external database. I had a little bit of a curve ball in accessing some list data from the external entity based on the context and the join. You were able to get me on the right track to get a list displayed (Thank you!!!).
Now I have a similar situation. However, instead of a list block, I want to use a screen block. Based on my understanding, I thought I would be able to switch out the block names and be good to go. However, no data is being returned to my page.
I have done some additional research on blocks...but I am not seeing or understanding why the code is not working.
This is the code for the list page that works..
(Item to note: the external database will only ever have 1 record with the contact information...therefore, every list is only returning one line item.)
var myBlock = CRM.GetBlock(LocContactsList);
var AddressID = Request.QueryString("Key58");
var AddressRecord = CRM.FindRecord("address", "addr_addressid="+AddressID);
var LocationAlias = AddressRecord.addr_localias;
var Arg = "alias='"+LocationAlias+"'";
CRM.AddContent(myBlock.Execute(Arg));
Response.Write(CRM.GetPage());
This is what I have in my View/Edit Page...Can you see anything here that would cause my page to not return any data when it returned a record on the list?
var myBlock = CRM.GetBlock(LocContactsDetailBox);
var AddressID = Request.QueryString("Key58");
var AddressRecord = CRM.FindRecord("address", "addr_addressid="+AddressID);
var LocationAlias = AddressRecord.addr_localias;
var Arg = "alias='"+LocationAlias+"'";
CRM.AddContent(myBlock.Execute(Arg));
Response.Write(CRM.GetPage());
All that I know for certain is that LocContactsList is an eWareListBlock and LocContactsDetailBox is an eWareEntryGroupBlock.
Any assistance or further reading you can recommend would be greatly appreciated. Thank you!!