locked
crmservice > field is missing RRS feed

  • Question

  • hi, i created a crm custom page in asp.net . i called the crmservice in it. i supposed that using

    invoice a = new invoice(); , then i should able to call all the field by using such as a.invoiceid ,  however i found that it is missing a field (at least) which is manually created so called a.deliverydate, the other field looks correct (even the other custom field). but a.deliverydate is missing. consequently i couldn't even call out a.deliverydate in asp.net (but that field is actually existed in crm system) how exactly it could happen? and what is the solution?

    thanks

    Monday, January 17, 2011 2:36 AM

Answers

  • Hello.

    In the case deliverydate is custom field you should use DynamicEntity like:

    DynamicEntity a = new DynamicEntity("invoice");

    a["custom field schema name here"] = <value to assign here>;


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Monday, January 17, 2011 4:25 AM
    Moderator
  • If you are seeing "some" custom fields, then I'm assuming you're using the web service via the WSDL (pointed at your CRM implementation)?  In which case, you should see ALL custom fields.

    Is it possible that you generated your web service proxy before the "deliverydate" attribute was created?  If so, you may just need to update the web reference; In Visual Studio:

    1. Right click the CrmService web reference
    2. Click "Update Web Reference"

    --pogo (pat)
    Monday, January 17, 2011 4:48 AM
  • It may seem like a pain in the ____, but you could try:

    1. Exporting your CrmService wsdl.  In CRM, go to Settings/Customisation/'Download Web Service Description Files'/CrmService.asmx.  Save it to your local dev file system.
    2. Update your web reference with the downloaded wsdl; right-click on the web reference, then click Properties.  Update the 'Web Reference URL' with the local wsdl file path.

    --pogo (pat)
    Monday, January 17, 2011 11:46 PM

All replies

  • Hello.

    In the case deliverydate is custom field you should use DynamicEntity like:

    DynamicEntity a = new DynamicEntity("invoice");

    a["custom field schema name here"] = <value to assign here>;


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Monday, January 17, 2011 4:25 AM
    Moderator
  • If you are seeing "some" custom fields, then I'm assuming you're using the web service via the WSDL (pointed at your CRM implementation)?  In which case, you should see ALL custom fields.

    Is it possible that you generated your web service proxy before the "deliverydate" attribute was created?  If so, you may just need to update the web reference; In Visual Studio:

    1. Right click the CrmService web reference
    2. Click "Update Web Reference"

    --pogo (pat)
    Monday, January 17, 2011 4:48 AM
  • are you attaching the web service by aading web reference?

    if so then, instantiate the web service and you should be able to get all the attributes of all entities even the customs,

    else use DynamicEntity, but here you will not get the intelicense.

     


    yes.sudhanshu

    http://bproud2banindian.blogspot.com
    http://ms-crm-2011-beta.blogspot.com
    Monday, January 17, 2011 5:10 AM
  • i haven't modify the crm entities after writing the custom page. i updated the web reference, but the problem is still not solved

    all the fields are able to be tagged in visual studio except that field, for example when i write

    invoice a = new invoice();

    a.totalamount , the totalamount is detected and can be selected. but it couldn't detect a.new_deliverydate

    in fact its name is "new_deliverydate" (but it can be applied in the filter[conditionexpression], because filter is accepting the string). will it matter ?

    also, when i used DynamicEntity a = new DynamicEntity("invoice"); , compiler said DynamicEntity doesn't take 1 argument, it is ok when i use DynamicEntity a = new DynamicEntity(); , but it couldn't get the fields of invoice

    thanks 

    Monday, January 17, 2011 7:28 AM
  • The WSDL web service versions of the DynamicEntity and other classes are parameterless; the version described is from the CRM SDK libraries.

    With respect to your custom attribute; I don't know.  An out of date web reference is the only valid reason I can think of, for a missing attribute.


    --pogo (pat)
    Monday, January 17, 2011 11:31 PM
  • It may seem like a pain in the ____, but you could try:

    1. Exporting your CrmService wsdl.  In CRM, go to Settings/Customisation/'Download Web Service Description Files'/CrmService.asmx.  Save it to your local dev file system.
    2. Update your web reference with the downloaded wsdl; right-click on the web reference, then click Properties.  Update the 'Web Reference URL' with the local wsdl file path.

    --pogo (pat)
    Monday, January 17, 2011 11:46 PM