Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I try to do Cascade Deleting First of all I'm adding Elements by this code in Item Deleting:

 SPListItem item = lstOtherList.Items.Add();
                   item["Kontrakt"] = properties.AfterProperties["Kontrakt1"];
                   item["Pracownik"] = properties.AfterProperties["Pracownik1"];
                   item["Dzien"] = dzienStart;
                   item["Procenty"] = properties.AfterProperties["Procenty"];
                   dzienStart = dzienStart.AddDays(1.0);
                   item.Update();

But when I added Cascade Deleting to the column "Szczegoly" enter image description here

Any elements in this field called "ID Czas Pracy Wpisy" didn't show. I must click and choose edit buton to the element and next save, to the element shown. enter image description here How should I add lookap values in the Item Adding to show ID Values from List "Wpisy" without klikink every element edit and next save.

If I try this code:

                       String lookupFieldName = "Kontrakt1";
                   String lookupFieldStringValue = Convert.ToString(properties.AfterProperties[lookupFieldName]);
                   item["ID Czas Pracy Wpisy"] = lookupFieldStringValue;

It's write me that the field could be the field only for reading.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.