Asset Management Suite

 View Only

Changing Asset Type 

Aug 11, 2009 03:24 AM

In the last few days I faced a problem with Helpdesk and Connector Solutions. I have imported some assets from external source using Connector solution and wanted to use these assets in my Helpdesk solution.

The problem I faced was that the new assets were imported with Asset Type (Asset). Hence, the Helpdesk system was not able to view it since the Resource Types list in the Admin menu does not include the (Asset) as an entry.

To solve this problem, I decided to change the asset type of my assets into a type that is supported by Helpdesk, like (Computer). But, I don't have Asset Management Solution to use it to change the asset type.

So, I had to run the below script on the SQL database to change the asset type. After I run that, all assets types are changed to (Computer) and I can see them in the Helpdesk Solution.


Here We Go

------------------------------------

1) First, get the required ResourceType ID:

SELECT     Guid as R_T_GUID , Name as R_T_NAME     FROM         ResourceType     WHERE Name = <RESOURCE_TYPE_NAME>




2) Get the GUID for the resource that you want to change the asset type for:

SELECT     Name as _R_NAME, Guid as R_GUID, Description as R_DESC    FROM         vResourceItem WHERE Name = <RESOURCE_NAME>




3) Now, Update the resource types as required:

UPDATE ItemResource    SET   ResourceTypeGuid = R_T_GUID    WHERE GUID = R_GUID


You can even make it more generic. Instead of replacing the asset type for a single asset, you can do that for a group of assets which have a common property. Then you should replace the condition in step number 2 with your required condition.



I hope this helps.



Regards,
Mustafa Abdel-Aziz







 
 


Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.