Mga Archive ng kategorya: SharePoint Development

Simple Paliwanag: “Halaga ay hindi mahulog sa loob ng inaasahang saklaw.”

I-UPDATE: An anonymous poster left a great comment about internal names. Be sure to read it.

Kapag nagtatrabaho sa receiver kaganapan at iba pang code na sumasangguni sa SharePoint listahan ng mga item sa pamamagitan ng bagay na modelo, Ako madalas gumawa ng mga pagkakamali na bumubuo ng mga error na ito sa runtime:

Error sa paglo-load at tumatakbo kaganapan receiver Conchango.xyzzyEventReceiver sa xyzzy, Bersyon = 1.0.0.0, Culture = neutral, PublicKeyToken = 0dc50a750396c3ac. Additional information is below. : Value does not fall within the expected range.

I think this is a fairly generic error that is potentially caused many different ways. Gayunman, one simple explanation is that I’m referencing a field incorrectly. If the name of the field is "Due Date", Dapat ko bang isangguni ito tulad ng ito sa isang receiver kaganapan:

properties.ListItem["Due Date"]

Kapag ako bumaybay nang pamali o gamitin sa maling kaso kapag tumutukoy sa mga patlang, SharePoint generates the above mentioned runtime error. Halimbawa, ito ang mali:

properties.ListItem["due Date"]

</dulo>

Mag-subscribe sa aking blog.

Technorati Tags:

Mabilis & Madali: Lumikha ng isang Folder at Magtalaga ng isang Uri ng Nilalaman (O, May ang iyong KPIs at Kumain kanila Masyadong)

Upang gumawa sa paligid ng isang KPI problema Ko sinulat ni tungkol dito, I did some testing and discovered that KPI’s work against folders with meta data in the same way that they work against documents or list items. I proved it out by creating a new content type based on the folder content type and then added a few fields. I created some indicators and proved to myself that KPIs work as expected. This was welcome news. It’s not perfect, because the drill-down you get from the KPI against the folders is not exactly what you want. This isn’t too much a drawback in my case because 1) ang mga end user ay hindi alam ang anumang mas mahusay at 2) the drill-down goes to a folder. They click the folder name and they are at the item. It’s two clicks instead of one, na kung saan ay hindi ang dulo ng mundo.

This flowed nicely with the work I was doing. I am creating a folder for every document that gets uploaded. This is done via an event receiver. Bilang isang resulta, ito ay isang piraso ng keyk upang panatilihin ang mga parent folder ni meta data in sync with the KPI-driven meta data from the file itself since the plumbing is already in place. This allows me to have my KPI’s and eat them too 🙂

I modified the event receiver to add the folder and then set this new folder’s content type to my custom KPI-friendly content type. This bit of code did the trick:

 SPFolderCollection srcFolders = targetWeb.GetFolder("Documents").Subfolder;
  SPFolder Idinagdag folder = srcFolders.Add(properties.ListItem.ID.ToString());
  SPContentTypeId kpiCT = bago SPContentTypeId("0x0120002A666CAA9176DC4AA8CBAA9DC6B4039F");
  addedFolder.Item["Content Type ID"] = kpiCT;
  addedFolder.Item.Update();

Upang mahanap ang aktwal na Nilalaman Uri ng ID, I-access na uri ng nilalaman sa pamamagitan ng mga setting ng site at kopyahin / paste ito mula sa URL tulad ng ipinapakita:

imahen

</dulo>

Mag-subscribe sa aking blog!

Technorati Tags: ,

Mabilis at madali: Kumuha ng ang SPFolder ng isang SPListItem sa isang receiver Kaganapan

Galit kong umamin ito, but I struggled with this one all day. My event receiver needs to update a field of its parent folder. This little bit shows how to do it:

pribado walang bisa UpdateParentFolder(SPItemEventProperties katangian)
{

SPFolder thisItemFolder = properties.ListItem.File.ParentFolder;
thisItemFolder.Item["ZZ Approval Status"] = "Good news, lahat!";
thisItemFolder.Item.Update();


} // UpdateParentFolder

Sa kasong ito, Ako nagtatrabaho sa isang dokumento na library at ang mga katangian ay darating mula isang ItemAdded na kaganapan.

Ang lansihin ay na hindi mo makuha ang SPFolder ng item direkta mula sa item mismo (i.e. properties.ListItem.Folder ay null). Sa halip, pumunta sa nauugnay File ng mga item sa listahan at makakuha ng folder ang File.

</dulo>

Mag-subscribe sa aking blog!

Technorati Tags:

Pa isa pang Kaganapan receiver Debug trick

I’m sure I’m not the first person to come up with this. Gayunman, I haven’t noticed anyone publish a trick like this since I started paying close attention to the community last July. Kaya, Naisip ko na gusto ko itong i-post ang mabilis at madaling tip debug.

Ako ay nagtatrabaho sa isang kaganapan na receiver na sinimulan upang bumuo ng ang error na ito sa 12 kaharian ng mga laywan:

Error sa paglo-load at tumatakbo kaganapan receiver Conchango.xyzzyEventReceiver sa xyzzy, Bersyon = 1.0.0.0, Culture = neutral, PublicKeyToken = blahbalhbalh. Additional information is below. : Object reference hindi nakatakda sa isang halimbawa ng isang bagay.

I didn’t know where I had introduced this bug because I had done too many things in one of my code/deploy/test cycles.

Sinubukan kong ito solusyon upang makakuha ng aking pdb sa doon may pag-asa na SharePoint ni 12 kaharian ng mga laywan ay magpapakita ng mga stack trace, but no luck. I don’t know if it’s possible and if someone does, mangyaring ipaalam sa akin 🙂

Alam ko posible upang isulat ang iyong sariling mga mensahe log sa 12 kaharian ng mga laywan. Frankly, Nais kong isang bagay ng kaunti mas nakakatakot at mas mabilis na ipapatupad.

Ito ay naganap sa akin na maaari ko ng hindi bababa sa makakuha ng ilang mga pangunahing impormasyon sa pamamagitan ng trace pansing at muling ibinabato generic pagbubukod ganito:

  sumubok {
    UpdateEditionDate(katangian);
  }
  abutin (Kataliwasan at)
  {
    magtapon bago Kataliwasan("Dispatcher, UpdateEditionDate(): Kataliwasan: [" + e.ToString() + "].");
  }

Ito ay nagpakita ng hanggang sa ang 12 kaharian ng mga laywan thusly:

Error sa paglo-load at tumatakbo kaganapan receiver Conchango.xyzzyEventReceiver sa xyzzy, Bersyon = 1.0.0.0, Culture = neutral, PublicKeyToken = blahblahblah. Additional information is below. : Despatsador, UpdateEditionDate(): Kataliwasan: [System.NullReferenceException: Object reference hindi nakatakda sa isang halimbawa ng isang bagay. at Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(SPItemEventProperties katangian) at Conchango.xyzzyManagementEventReceiver.Dispatcher(SPItemEventProperties katangian, String eventDescription)].

Na ibinigay mo sa akin ang lahat ng mga detalye na kailangan ko upang subaybayan ang down na partikular na problema at inaasahan kong gamitin ito ng maraming pasulong.

</dulo>

Mag-subscribe sa aking blog!

Solusyon: SPQuery ba Hindi Maghanap Folder

This past week I was implementing an "evolving" solution for a client that uses BDC and SPQuery and ran into some difficulty using SPQuery against a document library containing folders. Ika-line: assign "recursive" sa view na katangian ng mga query.

Aking mga sitwasyong:

  • Sa Monday, I-upload ang dokumento at matustusan ang ilang mga meta data.
  • Ang mga sumusunod na linggo, I upload a new document. Much of this new document’s meta data is based on the document I uploaded on Monday (which we call the "master document").
  • Lumikha kami ng isang web façade na serbisyo na nagbibigay ng isang BDC-friendly interface sa listahan upang ang mga user ay maaaring madaling mahanap na Lunes dokumento sa pamamagitan ng isang paghahanap pamagat.
  • A BDC data column provides a friendly user interface. (Ito ay bahagi ng aking mga pagtatangka sa paggamit ng BDC para sa isang mas friendly na hanay ng Paghahanap).

Ang huling BDC façade serbisyo ay gumagamit ng isang query tulad nito upang gawin ang paghahanap:

 // Ginamit U2U tool upang makatulong sa pagbuo ng mga ito CAML query.
      oQuery.Query =
        "<Saan>";

      kung (titleFilter.Length > 0)
        oQuery.Query   =
          "  <At>";

      oQuery.Query   =
        "    <At>" +
        "      <Geq>" +
        "        <FieldRef Name=\"DocumentId\" />" +
        "        <Value Type=\"Text\">" + MinID + "</Halaga>" +
        "      </Geq>" +
        "      <Leq>" +
        "        <FieldRef Name=\"DocumentId\" />" +
        "        <Value Type=\"Text\">" + maxId + "</Halaga>" +
        "      </Leq>" +
        "    </At>";

      kung (titleFilter.Length > 0)
        oQuery.Query   =
          "    <Naglalaman ng>" +
          "      <FieldRef Name=\"Title\" />" +
          "      <Value Type=\"Text\">" + titleFilter + "</Halaga>" +
          "    </Naglalaman ng>" +
          "  </At>";
      oQuery.Query   =
        "</Saan>";

Sa panahon ng unang yugto ng pag-unlad, this worked great. Gayunman, ipinakilala namin ang mga folder sa direktoryo upang malutas ang ilang mga problema at bigla, my BDC picker wouldn’t return any results. I tracked this down to the fact that the SPQuery would never return any results. We used folders primarily to allow multiple files with the same name to be uploaded but with different meta data. When the file is uploaded, lumikha kami ng isang folder batay sa mga ID ng mga item sa listahan at pagkatapos ay ilipat ang mga file doon (Ko sinulat ni tungkol sa na dito; mayroon kaming halo-halong mga resulta may diskarteng ito ngunit sa kabuuan, ito ay mahusay na gumagana). The user don’t care about folders and in fact, don’t really understand that there are any folders. We have configured all the views on the library to show items without regard to folders.

I hit this problem twice as the technical implementation evolved and solved it differently each time. The first time, I wasn’t using the CONTAINS operator in the query. Without a CONTAINS operator, I was able to solve the problem by specifying the view on the SPQuery’s contructor. Instead of using the default constructor:

SPList oList = web.Lists["Documents"];

SPQuery oQuery = bago SPQuery();

Ko sa halip ay gumamit ng isang constructor na tinukoy ng tanawin:

SPList oList = web.Lists["Documents"];

SPQuery oQuery = bago SPQuery(oList.Views["All Documents"]);

Na malulutas ang problema ko at sinimulan upang makakuha ng aking mga resulta.

I then added the CONTAINS operator into the mix and it broke again. It turns out that the CONTAINS operator, sa ngayon bilang ang maaari kong sabihin, ay hindi gumagana sa view ng ang parehong paraan tulad ng isang mas simpleng GEQ / LEQ operators. I did some searching and learned that the query’s ViewAttributes should be set to "Recursive", tulad ng sa:

oQuery.ViewAttributes = "Scope=\"Recursive\"";

That solved the problem for CONTAINS. Sa katunayan, ito rin malutas sa aking orihinal na problema sa paghahanap at kung ako ay tinukoy ang recursive katangian sa unang pagkakataon, Hindi ko nais na tumakbo sa mga isyu muli.

Ang katotohanan na ang isang pagtingin na batay sa SPQuery gumagana para sa ilang mga operator (GEQ/LEQ) at hindi ang iba (NAGLALAMAN), isinama sa ang katunayan na ang KPI hindi mukhang gumana sa lahat ng mga may-folder na naglalaman ng mga library dokumento humantong sa akin upang maniwala na SPQuery ay may ilang mga isyu orthogonality.

Espesyal na Salamat:

</dulo>

Mag-subscribe sa aking blog!

Moss KPI bug? Listahan Tagapagbatid ng nakatali sa Library ng Dokumento Sa Folder

I-UPDATE 02/29/08: I solved this problem by creating a folder and then assigning a content type to the folder which has the meta data I need for the KPIs. I described that in a little more detail here.

We have implemented a technical solution where users upload documents to a document library. An event receiver creates a directory and moves the file to that directory (using a technique similar to what I wrote about dito). We’ve successfully navigated around the potential issues caused by event receivers that rename uploaded files (mainly because users never start their document by clicking on "New" but instead create the docs locally and then upload them).

The meta data for these documents includes a Yes/No site column called "Urgent" and another site column called "Status". We need to meet a business requirement that shows the percentage of "Urgent" documents whose status is "Pending".

This is usually simple to do and I described something very much like this at the SharePoint Beagle with lots of screen shots if you’re interested.

In a nutshell, I did the following:

  • Create a view on the doc library called "Pending".
  • Configure the view to ignore folder structure.
  • Create a KPI List.
  • Create an indicator in the list that points to the doc lib and that "Pending" tingnan.

This simply does not work. The KPI shows my target (e.g. five urgent documents) but always shows the actual number of urgent documents as zero. Paradoxically, if you drill down to the details, it shows the five urgent documents in the list. I created a very simple scenario with two documents, one in a folder and one not. Here is the screen shot:

imahen

The above screen shot clearly shows there are two documents in the view but the "value" is one. The "CamlSchema" with blank document Id is in the root folder and the other is in a folder named "84".

Lumilitaw sa akin na kahit na iyong tinukoy ng tanawin, the KPI doesn’t honor the "show all items without folders" pagtatakda at sa halip ay, paligid mismo sa folder na root.

Kung ako ay mali, mangyaring i-drop ako ng isang linya o mag-iwan ng komento.

</dulo>

Mag-subscribe sa aking blog!

Technorati Tags:

Solusyon sa Problema: “FileNotFoundException” Sa My Tampok Tatanggap.

I was working on a feature last week that would add some event receivers to a specific list instance. (I-blog nang kaunti tungkol sa receiver na listahan dito).

Gamit ang command line, Maaari ko bang i-install ang tampok na walang error (ngunit tingnan sa ibaba para sa mga nakatagong error). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" mali. This blog entry describes how I solved it.

Ito ang error na Moss ay nagpakita sa akin sa web browser:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" Nabigo ang pag-: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ o isa sa mga dependency. Ang sistema ay hindi maaaring mahanap ang tinukoy na file.
Ang pangalan ng file: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName filename, String codebase, Katibayan assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Katibayan assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Katibayan assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Assembly nagbubuklod na pag-log ay naka-OFF.
Upang paganahin ang assembly magbigkis pagkabigo na pag-log, itakda ang mga registry value [HKLM Software Microsoft Fusion!EnableLog] (DWORD) upang 1.
Nota: Mayroong ilang mga pagganap ng multa na nauugnay sa assembly na pag-log magbigkis pagkabigo.
Upang i-on ang tampok na ito off, alisin ang mga registry value [HKLM Software Microsoft Fusion!EnableLog].

I-troubleshoot ang mga isyu sa Windows SharePoint Serbisyo.

Alam ko kung paano i-sadya maging sanhi ang error na iyon: don’t install the assembly in the GAC. Pero, it was in the GAC. I normally install assemblies into the GAC by dragging them into the c:\windows\assembly folder using windows explorer. I’ve never felt 100% komportable paggawa na dahil ako palaging naisip gacutil na umiral para sa isang dahilan … so I tried that. It made no difference.

Hinanap ko ang Internets at nahanap ang post na ito: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

Ang poster na nangyari sa ma-gamit ang parehong bit root ng code (mula sa Inside WSS aklat mula sa listahang ito) so that was a hopeful sign. Gayunman, ang mungkahi ng dekorasyon ang assembly na may isang [pagtitipon: ] directive didn’t make sense to me. I tried it anyway and I was right. It made no difference.

Then I noticed that my class definition was not public. I made it public and that made no difference.

Susunod, I went to the trouble of enabling the "assembly bind failure log" (ng pagsunod sa mga kapaki-pakinabang at tumpak na mga tagubilin na ibinigay) and this is where things started to get interesting. That log shows me that the runtime is searching everywhere on that server for my assembly. It even appears to be searching for it in my medicine cabinet. Pero … hindi ito maghanap ng mga ito sa GAC.

I put on my winter jacket and go searching the Internets again and find that someone has had this problem too. The lengthy discussion in that posting peters off into nothing and I can’t find a solution.

I move my assembly into one of the places the log claims it’s searching and I make a little more progress. I’m rewarded with a new error in the browser when I try to activate the feature:

Failed to create feature receiver object from assembly "xyzzyFeatureReceiver_0", type "Conchango.xyzzyFeatureReceiver" para sa tampok b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Halaga ay hindi maaaring maging null.
Pangalan ng parameter: uri
at System.Activator.CreateInstance(Uri ng uri, Boolean nonPublic)
at System.Activator.CreateInstance(Uri ng uri)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

I-troubleshoot ang mga isyu sa Windows SharePoint Serbisyo.

Oras para sa isang huling biyahe sa Internets!

Oras na ito mahanap ko out, predictably sapat, that MOSS issues this error because the assembly is not in GAC.

Gusto kong makakuha ng isang bagay na positibo out sa ito at subukan sa pakiramdam ng kaunti mapagmataas na aking nilikha ang Takas ng MSIL pagtitipon, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" sa ilalim ng aking hininga.

I finally decide to punt. I create an entirely new project and copy/paste the code from the incredible-cloaked-from-the-GAC-assembly non-working project over to this new project. (I look for a build flag called something like "hide from assembly binding if installed in the GAC" ngunit hindi mahanap ang isa).

I-install ko ang mga tampok at i-activate ito at … ito gumagana! Kaya, pagkatapos ng lahat na, I had to basically ‘reboot’ my project. Ito ay isa pang dahilan kung bakit ako mapoot mga computer.

I did learn something useful from this. I had been installing features using the stsadm command line all day long and been using the "-force" option out of habit. For some reason, I did not use the -force option when I installed the new project. Oras na ito, Ginawa ko talaga, truly forget to copy this new project’s assembly into the GAC. Bilang isang resulta, I received that "FielNotFoundException" mali. Oras na ito, Ang nakuha ko ito mula sa stsadm, not when I tried to activate the feature via the web browser. Kaya, -force actually plays two roles. It allows you to re-install an existing feature. It also allows you to install a buggy feature that cannot work at runtime by suppressing the error. It probably says as much in the help somewhere but I never noticed it.

</dulo>

Technorati Tags: ,

Mabilis & Madali: Palitan ang pangalan ng In-upload ng File Paggamit ng SharePoint Bagay Model Via isang Tatanggap ng Kaganapan

I-UPDATE: This works but there are significant limitations which are described in the comments. This may still be useful in some cirumstances.

I-UPDATE 2: Sa aking kasalukuyang proyekto, users always upload documents. Bilang isang resulta, I don’t run into a problem where MS Word is running and thinks that the file was renamed on it. I did run into a problem, "the file was modified by someone else" and solved this via a simple semaphore type flag. Users need to change a meta data field from its default value to something else. The itemupdated() receiver maghahanap ng isang wastong halaga doon bago aktwal na gumaganap ang palitan ang pangalan at mula noon, I have not had any problems. Your mileage may vary.

I have a client requirement to change the name of files uploaded to a specific document library to conform with a particular naming convention. The API does not provide a "rename()" pamamaraan. Sa halip, ginagamit namin "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 publiko magpawalang-bisa walang bisa ItemAdded(SPItemEventProperties katangian)
        {
            SPFile f = properties.ListItem.File;

            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url + "/xyzzy.doc");
            f.Update();

        }

The only tricky bit is the "properties.ListItem.ParentList.RootFolder.Url". The MoveTo() method requires a URL. That mashed up string points me to the root folder of my current document library. This allows me to avoid any hard coding in my event receiver.

Ito ay isang mas kapaki-pakinabang bersyon na gumagana ang parehong bagay, but assigns the name of the file to "Title":

 publiko magpawalang-bisa walang bisa ItemAdded(SPItemEventProperties katangian)
        {
            DisableEventFiring();

            // Magtalaga ng pamagat ng item na ito upang ang pangalan ng mismong file.
 // Tandaan: Pagtatalaga na ito ay kailangang maganap bago naming baguhin ang mismong file.
 // Pagtawag update() sa SPFile Mukhang magpawalang-bisa ang mga katangian sa
 // ilang mga kahulugan.  Updates to "Title" Nabigo ang hanggang sa pagbabagong iyon (at mag-update() tumawag)
 // ay inilipat sa harap ng mga pagbabago sa mga pangalan ng file.
            properties.ListItem["Title"] = Properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Kumuha ng mga extension ng file.  Kailangan namin na mamaya.
 pisi spfileExt = bago File Info(f.Name).Karugtong;

            // Palitan ng pangalan ang file sa ID sa listahan ng item at gamitin ang file extension upang panatilihing
 // na bahagi nito buo.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Commit ang paglipat.
            f.Update();

            EnableEventFiring();
        }

Quick Tip: Bahagi ng nilalaman Query Web, Lookup Haligi Halaga at XSL

I have a column name in a content type named "Real Estate Location".

That column is of type "lookup".

Ako nabago <CommonViewFields> at ItemStyle.xsl upang ipakita ang mga haligi.

Isang simple <xsl:sulit ng piliin =…> Ibinabalik ng likod ng isang panloob na halaga na kasama ang ORDINAL data posisyon, tulad ng:

1;#Miami

Upang makuha ang pantao-friendly na halaga, gamitin xsl substring-pagkatapos, tulad ng ipinapakita:

<xsl:value-of select="substring-after(@ Real_x005F_x0020_Estate_x005F_x0020_Location,'#')"></xsl:halaga-ng>

Gamitin ang diskarteng ito sa tuwing ikaw ay nagtatrabaho sa paghahanap ng mga halaga sa XSL transforms at kailangan upang makuha ang pantao-friendly na halaga.

<katapusan />

Technorati Tags: , ,

Mabilis at madali: Matukoy ang Panloob na Haligi Pangalan ng isang Haligi ng Site

I-UPDATE: Jeremy Thake Na-blog tungkol sa mga ito at ilagay up ng ilang mga code para sa isang application console na nagpapakita ng panloob na mga pangalan.

I was trying to get a content query web part to display a due date from a task and because the screen label is "Due Date", Ako ipinapalagay na ang Pangalan ng hanay upang gamitin sa <CommonViewFields> is "Due_x0020_Date".

Mali!

The real column name in this case was "DueDate".

Paano ko mahanap ito? I re-read Heather Entry sa blog ni Solomon sa pagbabago ng CQWP to show additional columns of data. She describes this process at step #13. Trust it. It’s correct. Kahit, it was correct for me. I did not trust it at first for another column with a much longer name.

I say "Trust it" because I did not trust it and probably wasted near two hours butting my head up against a wall. After I resolved the "DueDate" pangalan, Nais kong magdagdag ng isa pang field upang <CommonViewFields>. Using the Solomon technique, I was getting a column name like "XYZ_x0020_Project_x0020_Due_x00".

Akala ko sa sarili ko, that’s clearly a truncated name. I went ahead and un-truncated it with no success. I finally used the seemingly truncated name and it worked.

Bonus tip: Kapag ako ay nagtatrabaho kasama ang CQWP, kung ako ay nagdagdag ng isang masamang pangalan ng panloob na <CommonViewFields>, the CQWP would tell me that the query had returned no results. Pero, kung ako ay nagdagdag ng isang uri ng data upang ang pangalan ng field, it would return a result. Adding the data type actually masked a problem since I was referencing a non-existent field. I could add it, ngunit kapag sinubukan ko upang ipakita ang halaga nito, I would always get a blank.

Ito ay hindi mask ang error:

<CommonViewFields>Due_x0020_Date;</CommonViewfields>

Ito ang mask ang error:

<CommonViewFields>Due_x0020_Date,DATETIME;</CommonViewfields>

</dulo>