Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
C# Code to create custom object on RightNow — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

C# Code to create custom object on RightNow

Received Response
6
Views
1
Comments
edited Aug 24, 2018 3:23PM in Field Service 1 comment

Content

    string identificacao="teste";
                string cargo ="Analista sistema/CX";
                ///////***********************CAMPOS CUSTOMIZADOS
                List<ServiceReference1.GenericField> dv_lista = new List<ServiceReference1.GenericField> { };
                dv_lista.Add(createGenericField("dtp_idcontato", ServiceReference1.ItemsChoiceType.StringValue, identificacao));
                dv_lista.Add(createGenericField("dtp_cargo", ServiceReference1.ItemsChoiceType.StringValue, cargo));
              
                ServiceReference1.GenericObject gen = new ServiceReference1.GenericObject();
                gen.GenericFields = dv_lista.ToArray();

                //create a enclosure GenericObject containing 'c'
                List<ServiceReference1.GenericField> dv_lista_fields = new List<ServiceReference1.GenericField> { };
                dv_lista_fields.Add(createGenericField("c", ServiceReference1.ItemsChoiceType.ObjectValue, gen ));

                ServiceReference1.GenericObject genericObj = new ServiceReference1.GenericObject();
                genericObj.GenericFields = dv_lista_fields.ToArray();

                // coloca os campos genericos no objeto - sergio - 24/07/18
                account.CustomFields = genericObj;

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!