on 06-19-2015 8:23 AM
Hi Experts,
I have a UDO, "Generator Service Management" and I want to create a link button on one of the fields - Service Call.
I would like it such that if a user clicks on the yellow link button attached to the service call number, it opens up the SAP Service Call form with the corresponding service call number. Please see image below:
When link button is pressed in "1" above, the corresponding Service Call form is opened - "2"
How do I create a link button to achieve this? I use Coresuite add-on so if there is another way to do this with Coresuite I would be glad to know how.
Any help appreciated.
Using SAP 9.1 PL 6
Regards,
Kinyanjui.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kinyanjui,
the easiest way is to create a button next to the service call field,
Hide the button on form load if the Service Call Field is empty
then create a variable that stores the service call number
Open the form using the formLoad function quoting the object ID of the service call
Use the number stored in the service call to find the specific call.
Hope this helps.
Best,
Robinson
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.
I have this so far using Coresuite
try
{
StatusBar.WriteWarning("DEBUG - Rule: " + pVal.RuleInfo.RuleName + " was triggered.");
// Your Code
// (SOURCE) Store Requisition
SAPbouiCOM.Form oForm = SwissAddonFramework.B1Connector.GetB1Connector().Application.Forms.ActiveForm;
SAPbouiCOM.LinkedButton oLink;
SAPbouiCOM.Item oNewItem = oForm.Items.Add("23_U_E", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
}
catch (Exception ex)
{
string errorMessage = string.Format("Error in {0} Rule '{1}': {2}", pVal.RuleInfo.RuleType, pVal.RuleInfo.RuleName, ex.Message);
MessageBox.Show(errorMessage, "OK");
StatusBar.WriteError(errorMessage);
Debug.WriteMessage(errorMessage, Debug.DebugLevel.Exception);
}
return true;
Regards,
Kinyanjui
Hello Kinyanjui,
Use this code linked to the yellow button image to open the service call
-----------------------------------------------------------------------------------------------------------------------------------------------------
//Read the service call ID from current form
-----------------------------------------------------------------------------------------------------------------------------------------------------
Form CurrentForm = pVal.Form;
int serviceEntry = int.Parse(pVal.BusinessObjectKeyString);
SAPbobsCOM.Documents doc = (SAPbobsCOM.Documents)
SwissAddonFramework.B1Connector.GetB1Connector().Company.GetBusinessObject(
SAPbobsCOM.BoObjectTypes.oQuotations);
doc.GetByKey(serviceEntry);
-----------------------------------------------------------------------------------------------------------------------------------------------------
//Open Service Call with captured service call id
-----------------------------------------------------------------------------------------------------------------------------------------------------
Form form = Form.GetFormFromUID(SwissAddonFramework.B1Connector.GetB1Connector().Application.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_Service, "191", "serviceEntry").UniqueID);
-----------------------------------------------------------------------------------------------------------------------------------------------------
Regards,
Robinson
Hello Kinyanjui,
Sorry I assumed you had the button already.
At this point you could just create a normal button using coresuite and link it to the code provided earlier.
Another option is to use the SAP native code to display the button. Not really sure how this will work but I guess its worth exploring.
And this..
Check it out and let me know how it goes.
Regards,
Robinson.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.