Showing posts with label Custom Action. Show all posts
Showing posts with label Custom Action. Show all posts

Tuesday, March 5, 2013

Creating a polyline map for mapping shipments out of OTM

 

We had a requirement once to map the shipments out of OTM, but on a different system

Below is how I did it.. It might be of help..

 

otmtips.blogspot.com

 

Retrieve Shipment Stop Related Lat/Lan from OTM

SELECT SS.STOP_NUM,LAT,LON FROM SHIPMENT_STOP SS,
LOCATION LC WHERE SHIPMENT_GID='XXX.1002413'
AND SS.LOCATION_GID=LC.LOCATION_GID ORDER BY SS.STOP_NUM

 

Here’s the Javascript for rendering the Map

 

<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>

<script type="text/javascript">
var map = null;
function RenderMap()
{
map = new VEMap('MapDiv');
map.SetDashboardSize(VEDashboardSize.Normal);
map.LoadMap(new VELatLong(39.828180,-98.57955),4,'r',false,VEMapMode.Mode2D);
var RouteLayer= new VEShapeLayer();

var shipment1 = new VEShape(VEShapeType.Polyline,
[

new VELatLong(41.8672,-103.6575 ),
new VELatLong(41.8672,-103.6575 ),
new VELatLong(42.8419,-106.2818 )

 
]);
var shipment2 = new VEShape(VEShapeType.Polyline,
[
new VELatLong(33.776864,-84.437599), 
new VELatLong(36.223227,-86.977615) 

]);

shipment1.HideIcon();
shipment1.SetLineColor(new VEColor(0,225,0,1));
shipment1.SetLineWidth(3);

shipment2.HideIcon();
shipment2.SetLineColor(new VEColor(225,0,0,1));
shipment2.SetLineWidth(3);

RouteLayer.AddShape(shipment1);
RouteLayer.AddShape(shipment2);

map.AddShapeLayer(RouteLayer);
}
</script>

Friday, October 1, 2010

Configuring Action Checks

If you need to validate some values when performing a user action, you can configure Action checks to do validation

 

for example,  When a User creates a Order Base , we can validate if the base id contains any invalid / unwanted chars

 

select Audit Action as “Add Order Base”

image

 

Create Allow Condition as below

image

 

you can set the cause and solution labels with required error message

image

 

Assign this Action check to user or role as required…

Wednesday, June 16, 2010

Setting up manual trigger for agents | Custom Action on Screen

We can use Actions to trigger an agent manually on selected Object.  Here’s how we can do it

image

Set Action Name as required . Set the Label  (in Public Domain using DBA.ADMIN) with Relevant Name. This is the name you are going to use when setting up the Action Link in Screenset

image

 

Select Required Definition, if you are running Action on shipment Objects and Trying to invoke Agent, select RUN_AGENT_SHIPMENT.  Agent ID Field shows list of Agents which can be invoked.

 

In Your custom screenset,  go to Actions tab and add action

image

Select “Add Actions” and choose the Action you created above..

image