I have been through the Training T400 and T410, but I cannot get this to work in my own application. I have looked at some of the related topics on here, and in StackOverflow, and nothing I try seems to work.
I have a custom action that I have added to FS300200. This will call out to an external web application to allow a form to be filled out, which will eventually generate a PDF that gets attached to the appointment.
This works fine from within the Web Page:
In the custom DLL, the source code looks like this:
#region XForm Button
public PXAction<FSAppointment> asgExtForms;
PXUIField(DisplayName = "DoorForm", MapEnableRights = PXCacheRights.Select)]
PXButton]
public virtual void ASGExtForms()
{
var allCaches = Base.Caches.Caches;
/************************************************
* Code builds fuill url based on what is found in cache
************************************************/
string fullURL = "SOME VALUE BASED ON CACHE";
// Everything is gathered up. Time to send it
var redirectException =
new PXRedirectToUrlException(fullURL,
PXBaseRedirectException.WindowMode.New, "Acumatica.com");
throw redirectException; // call URL
}
#endregion
When I look at the web service, and examine the WSDL, I see that it is in the actions:
<ASGExtForms> <ViewTypeName>string</ViewTypeName> </ASGExtForms>
But I cannot seem to figure out how to add this to the mobile.
I have tried several things to add this to the Appointment screen in Mobile. Ideally. I’d like a button in the Additional Tab that said: “Door Forms” and in that would be a button that did the call out action to the external form application.
Based on an answer I saw on here, I have tried this:
update screen FS300200
{
update container "AppointmentRecords"
{
update layout "AdditionalTab"
{
add layout "ASGLine"
{
add recordActionLink "ASGExtForms"
}
}
add recordAction "ASGExtForms"
{
displayName = "DoorForms"
behavior = Void
}
}
}
That did not give me any errors. But it does not display the new layout or link, either.
It DOES modify the screen. I see this in the screen preview now:
add containerLink "Attributes"
add layout "ASGLine"
{
displayName = "ASGLine"
add recordActionLink "ASGExtForms"
}
And also I see this:
add recordAction "ASGExtForms" {
displayName = "DoorForms"
behavior = Void
}
attachments {
}
But I see nothing in the Appointments Additional Tab:
I must be missing something simple… but what?
TIA!