Comments

  • 1-13 of 13
  • Vijaya

    HI Sophia,

     

    Can you send me the code for Calling addins for report?

    My requirement: I need to get the context of the selected row from the report, and those I have to use on button click.

    Please help me to solve this requirement.

    ThanksInAdvance

  • Vijaya

    Hi Bastiaan,

    "Alternative is to create an Add-In which does exactly what you need."

    can you please give me some more info on this means how exactly we can do this using addin(Requirememnt2).

    ThanksInAdvance.

     

  • Vijaya

    Thanks all for the quick response.

    For requirement 1 : I followed the Bastiaan approach.
    Req2: I m trying Gursimran approach -But workflows are not enable in my application. Is there any other approach for this.

    Please help me on this.

    Thanks In Advance

  • Vijaya

    Thanks Scott.

    By removing the Wait() my problem got resolved but if I am clicking again and again on the button its giving error like " This instance has already started one or more requests.Properties can only be modified before sending the first request".

    How to handle this exception.

    ThanksInAdvance

  • Vijaya

    Hi Chirag

    I m  tryinh to create a same record using soap call

      RightNowSyncPortClient _client = new RightNowSyncPortClient(binding, endPointAddr);

      _client.Create(clientInfoHeader, apireq, createObjects, createProcessingOptions, out createResults);

    But it is not creating the record. The errors are unable to Create Readonly field and hidden field values. Suggest me any other way please

    ThanksInAdvance

  • Vijaya

    HI nishi

    Thanks for the suggestion

    so i need to trigger a workspace rule on save click? Actually  in rules i m having only "The record is saved without closing" trigger value but if user clicks on save and close then my requirement will fail.

    Supoose I created a rule on save click and int hat particular method i saved the record and exceute the query also but how i will cancelt he save if he query results are 0???

    My req is first of all i need to save the record then using ID i need to exceute a query. if there are no query results then need to throw a mandatory message and cancel the record.

    Is this is possible using rules??

  • Vijaya

    Thanks Heena for quick response.

    What is the best way to do this requirement?

    please help me on this.

  • Vijaya

    Hi Chirag

    Thanks for the response.

    Can I get any sample code for this.

    ThanksInAdvance

  • Vijaya

    Hi Cristian,

    I am working with asset object. So Directly I am not getting the Asset workaspace record. For this I did like below

    var recordcontext = _recordContext.GetWorkspaceRecord(_recordContext.WorkspaceTypeName);
                int assetid = (int)recordcontext.GetType().GetProperty("ID").GetValue(recordcontext);

    using ROQL: I am getting all customattributes.

     #region ROQL
                ClientInfoHeader clientInfoHeader = new ClientInfoHeader();
                clientInfoHeader.AppID = "Retrieve Data";
                string Querystring = "SELECT Asset FROM Asset WHERE Asset.ID = " + assetid;
                Asset asset = new Asset();
                asset.CustomFields = new GenericObject();
                asset.CustomFields.GenericFields = new GenericField[] { };
                RNObject[] template = new RNObject[] { asset };
                QueryResultData[] queryResults = _client.QueryObjects(clientInfoHeader, Querystring, template, 1000);
                RNObject[] assets = queryResults[0].RNObjectsResult;
                if (assets.Length > 0)
                {
                    Asset asset1 = (Asset)assets[0];
                    GenericField[] genf = ((PopulateLogindetinAsset.ServiceReference1.GenericObject)asset1.CustomFields.GenericFields[0].DataValue.Items[0]).GenericFields;
                    if (genf.Count() > 0)
                    {
                        GenericField genField = genf.First(x => x.name == "RecommendedBy");
                        if (genField.DataValue == null)
                        {
                            DataValue dv = new DataValue();
                            dv.Items = new[] { Login };
                            genField.DataValue = dv;                      
                        }
                    }
                }
                #endregion
                _recordContext.RefreshWorkspace();

     

    So we are not getting CustomAttributes from RecordContext. So whatever we updating in the CustomAttributes from ROQL are not reflecting in the RecordContext. so the values are not setting in the fields. Please check this once.

    ​ThanksInAdvance.

  • Vijaya

    HI

    My requirement : when a field1 changes to specific value then field 2(readonly textbox) has to populate with logged in user name.

    I created an addin in which when a field changes and changes  to yes then execute my addin. In rukeactioninvoke I gave the actionname and got the loggedin username. how I need to return that value??

    Is this possible to set value with dynamically (with out saving the record)?? Please help

    ThanksInAdvance

  • Vijaya

    Hi I created a rule like when field changes to specific value then execute my addin(gave actionname). control is coming to ruleactioninvoke. My question is how to populated value in other field? Is need to initialise the object and set the value to the generic field??please give me a sample.

    Field 1 -checkbox, Field2 - textbox

    On checkbox checks, current loggedin user name has to populate in field 2(so I need to return loggedin user name and set to field 2 from addin when rule invokes)

    is it possible to set the value dynamically???

    Thanks in advance

  • Vijaya

    HI Cristian,

    Can I get the sample code of this requirement.

    Thanks in advance

  • Vijaya

    Hi

    We can get Asset workspace record like

    var reccont = _recContext.GetWorkspaceRecord(_recContext.WorkspaceTypeName) and unable to get CustomAttributes from this.

    So I tried with Igenericobject like below

    IGenericObject recContext= _recContext.GetWorkspaceRecord(_recContext.WorkspaceTypeName) as IGenericObject

    but recContext is coming as null.

    Please help me how to get customfields from standard objects(Asset).

    Thanks In Advance