none
Plug-in issue RRS feed

  • Frage

  • Dear all

       i am working in crm 4.0..i have created a plug-in..when i am trying to create a new colimn set as mentioned below.

    Columnset cols = new Columnset()
    cols.Attributes =new String[] {"fullname"}


    when ia m trying to build this,  am geting the following error..

    Cannot implicit type string to 'System.Collection.ArrayList'


    please help me out ..

    Regards

    Arun
    Donnerstag, 10. September 2009 06:08

Antworten

  • Hi,

    cols.Attributes is of type ArrayList, so you can't assign a string array. In addition it has no setter, so you cannot assign anything at all.
    Either you use the constructor
    ColumnSet columnSet = new ColumnSet(new[]{"col1","col2"});
    Or you add the columns with the appropriate methods

    columnSet.AddColumns(new[] { "col1", "col2" });
    columnSet.AddColumn( "col" );
    • Als Antwort vorgeschlagen ckeller Donnerstag, 10. September 2009 06:54
    • Als Antwort markiert JuergenBeckModerator Dienstag, 5. Januar 2010 22:39
    Donnerstag, 10. September 2009 06:53

Alle Antworten

  • Hi,

    cols.Attributes is of type ArrayList, so you can't assign a string array. In addition it has no setter, so you cannot assign anything at all.
    Either you use the constructor
    ColumnSet columnSet = new ColumnSet(new[]{"col1","col2"});
    Or you add the columns with the appropriate methods

    columnSet.AddColumns(new[] { "col1", "col2" });
    columnSet.AddColumn( "col" );
    • Als Antwort vorgeschlagen ckeller Donnerstag, 10. September 2009 06:54
    • Als Antwort markiert JuergenBeckModerator Dienstag, 5. Januar 2010 22:39
    Donnerstag, 10. September 2009 06:53
  • Dear Keller

    Thank you for your reply..I have solved this in different way, but when i am trying to use this in condition expresion, i got the same error
    (Arraylist error)as mentioned in the previous blog...
    where i am going wrong..Please help me..

    Regards

    Arun
    Donnerstag, 10. September 2009 07:01
  • Hi Arun,

    can you please show your code?
    Donnerstag, 10. September 2009 07:17