Application Lifecycle Conductor

Expand all | Collapse all

Remote records Forms

  • 1.  Remote records Forms

    Posted Aug 03, 2017 01:14 PM

    Could we edit the remote records forms (Ex: CA SDM remote record form)? We have created a couple of custom fields in SDM and it is important to have this reference from ALC.

     

    In the same way, could we do a filter or search criteria, based con an attribute value from remote records?

     

    Thanks for your comments.

     

    Regards,

    JOHN



  • 2.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 03, 2017 02:31 PM

    1. No. We cannot edit SDM remoter record form. This form is based on the screen definition that is actually part of the SDM jar. we might need to externalize these screen defs so that those can be customized. We have this kind of  feature for the newer connectors. This would be an enhancement.

    2. Yes. You can search based on the remote record details. Search would bring up the ALC items to which the matching remote records are related.



  • 3.  Re: Remote records Forms

    Posted Aug 03, 2017 03:49 PM

    Hi Madhu Garimilla, thanks for your help.

     

    I assume this filter works using remote record fields documented in https://docops.ca.com/ca-alc/3-0/en/using/query-for-items/query-syntax#QuerySyntax-RemoteRecordFields , but based on some remote record values, for example in this case, CA SDM Change Order fields (status, prioriry, type, category), fiels already available in the remote record form?

     

    Regards,

    JOHN



  • 4.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 04, 2017 01:53 PM

    John, Could you let me know the complete use case that you are trying to achieve.



  • 5.  Re: Remote records Forms

    Posted Aug 04, 2017 02:13 PM
      |   view attached

    Shure, and thank you very much for your support with this.

    Attached you'll find a full description.

    Regards,

    JOHN

    Attachment(s)



  • 6.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 07, 2017 03:58 PM
      |   view attached

    For those fields which are already available in remote record form , you can use something like this to get all Change orders with status as Open. You can use any filter format that is supported by SDM.

     

    CASdmChangeOrderConnector conn = new CASdmChangeOrderConnector();
    List<ThirdPartyObject> list = conn.getObjects("status.sym='Open'", null, "User=<your_sdm_userid>;Password=<your_sdm_password>");

     

    For those fields which are not available in remote record form, ALC provides a set of place holder to fields to accommodate  those. you can try to display all the field names and values for a remote record programmatically and find out which place holder field is holding the value for your custom field and then you can use that field just like the one in above example. For custom fields with boolean values, ALC provide place holders would be having names like flag1, flag2 etc and for the fields with character data field names would be like string1, string2 etc.  Following the above example, you can use the below code to list the field names and values.

     

    for(int i = 0; i<list.size();i++)
            {
                ThirdPartyObject obj = list.get(i);
                List<String> flds = obj.getDisplayNames();
                List<Object> vals = obj.getValues();                       
                for (int x = 0; x < flds.size(); x++) {
                    System.out.println("FieldName:"+x+"  Value:"+vals.get(x));
                }
            }

     

    Attached the sample script that i have tried using a menu macro for reference.

    Attachment(s)

    zip
    script.txt.zip   546 B 1 version


  • 7.  Re: Remote records Forms

    Posted Aug 07, 2017 06:02 PM

    Thanks for your help. Just to clarify... i could test this scrit in a Menu macro object? This code lines must be declared in Menu macro object or the script object within in?

    Best Regards,

    JOHN



  • 8.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 08, 2017 09:32 AM

    You need to add a menu macro and add a stand alone rule object(script) to it and put this code inside that script object.



  • 9.  Re: Remote records Forms

    Posted Aug 14, 2017 12:12 PM
      |   view attached

    Thanks, We have applied the process, but it does not give any result. What can we be doing wrong?

    Attachment(s)

    pdf
    MenumacroTest.pdf   479 KB 1 version


  • 10.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 15, 2017 09:07 AM

    John,

    Can you try the below code. it opens up a record grid with the list of Items that has these remote records.

     

    var conn = new Packages.purescm.vegas.plugins.sd.CASdmChangeOrderConnector();

    var list = conn.getObjects("status.sym='Open'", null, "User=ServiceDesk;Password=<urpassword>");

     

    var idString = "";

    var  ids = new java.util.ArrayList();

                for(var i = 0; i<list.size();i++)

                {

                      var obj = list.get(i);

                      idString = idString+ "'"+obj.getId()+"'";

                      if(i+1<list.size())

                        {

                      idString = idString+",";

                        }

                }

    var query = "\"Remote Object ID\" IN ("+idString+")";

    ClientMethods.openQueryGrid(query, null,null, "SDM Remote records", version, false, "ID 100, Name 200,Description 200, Status 200", securityContext);

     

     

    Thanks,

    Madhu Garimilla



  • 11.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 15, 2017 11:16 AM

    If your connector is already configured with ca sdm username and password, you can simply ignore those in the above script and pass in a null like this.

     

    var list = conn.getObjects("status.sym='Open'", null, null);



  • 12.  Re: Remote records Forms

    Posted Aug 23, 2017 03:56 PM

    Madhu Garimilla, Could you please help me by clarifying some of the method. This is what i found in the documentation.

     

    ClientMethods (Vegas Engine)



  • 13.  Re: Remote records Forms

    Broadcom Employee
    Posted Aug 24, 2017 04:07 PM

    Right now, it accepts only field name and column size. What is your requirement?



  • 14.  Re: Remote records Forms

    Posted Aug 25, 2017 02:20 PM

    Just to translate or set an alias for column name.

    Thanks.

    JOHN



  • 15.  Re: Remote records Forms

    Posted Aug 15, 2017 12:27 PM

    Thank you. It works perfectly!

    Just a little message appears when the where clause return an empty list.

     

    An unexpected error has been detected. The current view will be closed to prevent corruption of application data. If the problem persists, please contact the System Administrator for assistance.
    purescm.vegas.engine.exceptions.QueryException: Syntax Error: Encountered " <DELIMITED_IDENTIFIER> "\"Remote Object ID\" "" at line 1, column 1.
    Was expecting:
    "(" ...

     

    How can we handle this?

     

    Again, thanks a lot for your help.

     

    Regards,

    JOHN