Using the GetPackageData Web Method
4 min
returns the details of the specified request offering request syntax publicfrsheatgetpackagedataresponse getpackagedata(string sessionkey, string tenantid, string strsubscrrecid) parameters sessionkey the session key from the connect web method tenantid the tenant for which the session key is authenticated strsubscrrecid the subscription id corresponding to the request offering for the current user return value frsheatgetpackagedataresponse object, defined as follows public class frsheatgetpackagedataresponse { public string status { get; set; } public string exceptionreason { get; set; } public frsheatservicereqsubscription srsubscription { get; set; } } the frsheatgetpackagedataresponse class has the following fields status provides a status about the state of the connection the table below contains a full description of the available status values exceptionreason contains exception information, if the application throws an exception when running this web method srsubscription contains an frsheatservicereqsubscription object that contains the full details of the request offering (such as the parameter details) the frsheatservicereqsubscription class is defined as follows public class frsheatservicereqsubscription { public string strsubscriptionrecid; public string strdatesubscribed; public string strorgunitid; public string strname; public string strdescription; public string strservicename; public string strrecid; public list\<frsheatservicereqtemplateparam> lstparameters; } the frsheatservicereqtemplatelistitem class has the following fields strsubscriptionrecid the subscription id corresponding to the request offering for the current user strdatesubscribed the date when the request offering was marked as published and subscribed strorgunitid recid of the organizational unit the request offering is associated with strname the name of the request offering strdescription the description value of the request offering strservicename the name of the service that the request offering is associated with strrecid the recid of the request offering lstparameters a list of frsheatservicereqtemplateparam objects, each item representing a parameter in the request offering the frsheatservicereqtemplateparam class is defined as follows public class frsheatservicereqtemplateparam { public string strname; public string strlabel; public string strdescription; public string strtype; public bool ballowselectbyuser; public bool bdbvalidated; public string strrequiredexpression; public bool iscalculated; public bool autofillonlywhenempty; public string strvalidationlistrecid; public string strvalidationlisttableref; public bool bishidden; public string strrecid; public list\<validationconstraint> validationconstraints; public string strvalidationconstraints; public string strautofillexpression; public list\<string> triggerfields; public string strtriggerfields; public string strdefaultvalue; } the frsheatservicereqtemplatelistitem class has the following fields strname name of the parameter strlabel label of the parameter strdescription description of the parameter strtype type of the parameter ballowselectbyuser flag indicating whether the parameter can be selected by the user bdbvalidated flag indicating whether the parameter is validated strrequiredexpression expression indicating how the parameter is (conditionally) required iscalculated flag indicating whether the parameter is calculated (that is, does not take inputs from users) autofillonlywhenempty flag indicating whether the autofill for the parameter occurs, when the parameter is initially empty strvalidationlistrecid recid of the named validation list (such as a pick list), if the parameter is a drop down selection strvalidationlisttableref the name of the business object, from which the drop down values are retrieved, for the drop down selection bishidden flag indicating whether the parameter is hidden strrecid recid of the request offering parameter validationconstraints list of validation constraint objects, used for representing the validation constraints currently set on the parameter strvalidationconstraints textual representation of the validationconstraints member strautofillexpression textual representation of the autofill expression triggerfields list of dependent parameters, upon which the current parameter is dependent upon strtriggerfields textual representation of the triggerfields member strdefaultvalue textual representation of the default value for the parameter the following table lists the available status values and describes how to interpret them \<font color="#ffffff">status\</font>\<font color="#ffffff">explanation\</font> success successfully retrieved the details of the request offering this list is available in the srsubscription field notfound the tenant does not contain a request offering with the specified subscription id ensure that the subscription id of the request offering is spelled correctly note that the getsubscriptionid web method is used for returning the subscription id corresponding to the current user error an error was encountered during the execution of this web method inspect the corresponding exceptionreason field to determine why the web method has failed example frsheatgetpackagedataresponse getpackagedataresponse = frsvc getpackagedata(authsessionkey, tenantid, strsubscrrecid); frsheatservicereqsubscription scsrs; if (getpackagedataresponse status == "success") { scsrs = getpackagedataresponse srsubscription; // go ahead and access the relevant properties of interest from the request offering }
